how to read XML from a variable

  • Thread starter Thread starter Dica
  • Start date Start date
D

Dica

i've got an XML file that's been encrypted. before i can read the XML, i
first have to decrypt the XML and add to a string variable like so:
String sXmlDataDecrypted = Encoding.ASCII.GetString(btXmlDataDecrypted);



now that the XML data is decrypted, i want to load and loop through the
nodes, but XmlTextReader requires a path to a physical file. is there a way
to load an XML doc from a variable into a reader?



tks
 
I believe that a constructor for XmlTextReader also accepts a
TextReader, so you could pass it a StringReader constructed around your
string.
 
Bruce Wood said:
I believe that a constructor for XmlTextReader also accepts a
TextReader, so you could pass it a StringReader constructed around your
string.

works perfect. tks bruce.
 
Back
Top