Jump to content

narag

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. narag

    XML parsing problems

    Most new interfaces use REST and JSON, that seem to be easier to get right. Still I'm not sure where to put the blame exactly. Maybe it's just me đŸ™‚
  2. narag

    XML parsing problems

    And still, that's the error that I get: Project Xml2Json.exe raised exception class EDOMParseError with message 'Se encontrĂ³ un carĂ¡cter no vĂ¡lido en el contenido del texto. Line: 10 <Agent>SOMEMF Ga'. And yes, that's the position where the first non-ANSI char is. I started with the SOAP interface directly feeding the XML parser. That caused AV. Debugging step by step doesn't help very much, because most of the time I fall into System unit assembler that (I guess) dispatches interfaces calls. So I write the XML to file and then read it to make sure the encoding is right, but it still complains. Is there another library that I can use? Thank you!
  3. I've been assigned the task of connecting to a SOAP web service and reading a list of offices that will be sent to me in XML. I've worked with SOAP and Delphi before, but not both at the same time in the last decade, so I've been going through what seems to be the usual procedure: creating an interface unit with the IDE wizard (Delphi 11) from the WSDL URL, using the properties that interface gives me to login (it works) and passing the XML to TXMLDocument. This is where the joy ends. The text I get doesn't have an XML header, it contains spaces inside the values and non-ANSI characters. I've tried to follow the execution, but it goes into sections of assembler and external calls, it seems that TXMLDocument is a wrapper around a Windows library. The final error is usually AV when I ask for "ChildNodes" from the root. From this description, can you think of any steps where I might be screwing up? Is there any component or library that can replace the ones I use? I also tried a unit that comes with SuperObject (I have to convert the list to JSON later), but it also gets stuck with the received XML. If it were just to get the list of offices, I would even consider making an ad hoc parser, but I'm afraid I'll soon have to interact a lot more with that API. Thanks in advance!
Ă—