Retrieve XML document but not able to save it

Startbeitrag von PETER ZHOU am 16.09.2013 00:46


I can retrieve the XML document without any issue using HTTPGetResult() but how to save it locally ?

I use the following code after retrieve the XML doc:
// Rebuild the XML string
XMLSource is string = XMLBuildString(sXmlDoc)
// Save XML document in a file
fSaveText("C:\Temp\ModifiedExample.xml", XMLSource)

But it only produce the following in XML file without any data





The XML is already a document - you do not need the the XMLBuildString section.
Once you have saved it to disk you can open it to review the contents in any XML viewer or double click to see the content in IE or similar - this assumes it is correctly formatted.
(I use a free app named 'foxe' from for this - works well)
If all you see at this stage is the header then check that the XML does have content - where is it from, who created it?
You can also try analysing it by loading it into one of the many such programs available on the web - google is your friend.

If you need to use the contained information in WD then load the document into an ANSI string variable using fLoadText and then use the XML functions in WD to navigate the content to extract what you require.

von DerekT - am 16.09.2013 08:08
Zur Information: hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.