Of course ...
Any one one of the various classes under System.Xml will accomplish exactly
this.
XmlTextReader rdr = new XmlTextReader(new StringReader("<tag1>some
data</tag1><tag2>some more data</tag2>"));
rdr.MoveToContent();
while (rdr.Read()){
//Processing here
}
XmlDocument xml = new XmlDocument();
xml.LoadXml("<tag1>some data</tag1><tag2>some more data</tag2>");
and so on ... there are several options for accomplishing this... just read
the documentation
Alex
"JezB" <jb*******@blueyonder.co.yk> wrote in message
news:OE**************@TK2MSFTNGP10.phx.gbl...
I have a string which contains some xml text (either in one long line or
split into one line per data element), eg.
"<tag1>some data</tag1><tag2>some more data</tag2>"
or
"<tag1>some data</tag1> (embedded \n
character)
<tag2>some more data</tag2>"
Does the framework provide anything to easily parse this text to get at
the tags and data elements one by one ? I could of course write my own but Im
sure there must be something already there ... I just need to find it.