XML in C# (2)

  • Thread starter Thread starter Germic
  • Start date Start date
G

Germic

Hi,

My webservice generates XML string by using xstream
(http://xstream.codehaus.org/), the problem is that it generates the XML
string without a root element.

Now, how do i persist that into an XMLDocument or XMLReader and then
retreive the data?
Adding the root element at the clients side is one way out anyother
suggestions?
 
Hi,
I am not familiar with the xstream product but i would guess they have
a way. that said, building by hand, one would be to create a node in
your doc:

System.Xml.XmlNode mynode;
mynode =
mydoc.CreateNode(System.Xml.XmlNodeType.Element,"Root","yourURL");
mynode.InnerXml=YourStream;
mydoc.AppendChild(mynode);

HTH

Tal McMahon
 
Back
Top