Article View: borland.public.cppbuilder.internet.socket
Article #4016Re: how to create XMLDocument from text string
From: Hans Galema
Date: Wed, 27 Apr 2005 08:14
Date: Wed, 27 Apr 2005 08:14
25 lines
2046 bytes
2046 bytes
Daniel Stevenson wrote: > the XML I'm receiving is valid, but I'm can only receive it as text via the > socket, and I want to put it into an XMLDocument so I can search for nodes > and find data easily. > > The type of XML text I am receiving is ... > > "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<OAP-response > version=\"3.0\" id=\"97302\">\n<Status > service=\"supervision\"><Type>1</Type><Code>200</Code></Status>\n</OAP-respo > nse>\n" Well that what you call text is indeed already an xml document in a memory buffer You could just save that as a file and then use TXMLDocument to load that file. Do I understand correctly that you want to omit that step and put the text directly in an instance of TXMLDocument ? As said before: I have no experience with that. But I would be disappointed if TXMLDocument did not provide methods with which one could put or stream that in directly. Hans.
Technical Details
Message-ID:
<426f4a6b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.kamp.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<426f30b1@newsgroups.borland.com> <426f3bd3@newsgroups.borland.com> <426f42d1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,202e5b119b206323 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 27 Apr 2005 10:14:03 +0200 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: how to create XMLDocument from text string References: <426f30b1@newsgroups.borland.com> <426f3bd3@newsgroups.borland.com> <426f42d1@newsgroups.borland.com> In-Reply-To: <426f42d1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <426f4a6b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114589803 129.125.201.248 (27 Apr 2005 01:16:43 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.kamp.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail