Hi,
If your goal is to feed an XmlNode into an XmlReader you may be able to
do this using the code below:
using System.IO;
using System.Text;
using System.Xml;
....
XmlNode node = GetNodeFromSomewhere();
using(MemoryStream ms = new MemoryStream())
{
byte[] nodeData = Encoding.Default.GetBytes(node.OuterXml);
ms.Write(nodeData);
using(XmlReader xr = XmlReader.Create(ms))
{
// Do something with the reader.
}
}
I haven't tested this for Xml serialization so I cannot guarantee this
will work for you.
On Sun, 13 May 2007 11:07:26 +0200, sachy <sa***********@gmail.comwrote:
Hello All,
I want to deserialize part of xml into a object. For this i am
having class that implements the IXmlSerializable interface. For this
class i get the xmlnode object that has the xml.
How do i read this xmlnode object in the readxml of
IXmlSerializable ? as the ReadXml has the xmlreader object as as
input. How do i associate the xmlreader to xmlnode so that i can go
ahead with reader.read().
Any help would be highly appreciated.
Thanks & Regards,
Sachin naik.
--
Happy coding!
Morten Wennevik [C# MVP]