Hi All. I am Sending an HTTP request to a server that is returning some XML in an Android app.
However, I get an unexpected result. I am using Indy and the idHTTP.get() function which returns either a string or populates a stream. I started out first by loading the results into a string variable, i.e. buffer:=isHTTP.get() which returns the data fine, BUT if I call LoadXMLData(buffer) - (LoadXmlData() is in Xml.XMLDoc.pas) which is a function I have used a number of time in Delphi in normal Windows apps and never had a problem - that wasn't something I did :) However, if in the android app, I load the buffer variable into a string list then save that to file the call LoadXMLDocument() that takes a file name, it works fine !! Oh, the error I get is "ET_INVALID_XML_DECL line:-1" which indicates the XML is invalid but if I do a showmessage(buffer) its perfectly fine. I have tried loading the result into a stream and the reading it out into a string and I get the same error. I have tried removing the #13#10's and STILL I get the error. If I write the XML to file first, no problem. I have tried using String and DOMStrings, but still the same error Anyone got any ideas? I shouldn't have to write the xml to file then load it, that's a bit of a pain. Thanks, Jeremy
_______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: [email protected] Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [email protected] with Subject: unsubscribe
