{
MemoryStream stream=null;
XmlTextWriter writer=null;
Try
{
The stream=new MemoryStream ();
Writer=new XmlTextWriter (stream, Encoding UTF8);
XmlDS. WriteXml (writer);
Int count=(int) stream. Length;
Byte [] arr=new byte (count);
Stream. Seek (0, SeekOrigin. Begin);
Stream. Read (arr. Zero, count);
UTF8Encoding utf=new and UTF8Encoding (); and
Return utf. Get string (arr). The Trim ();
}
Catch
{
Return a String. The Empty;
}
The finally
{
If (a writer!=null) writer. The Close ();
}
}
Method USES the generated XML for use after
?
- Related
- Links:
- CodePudding