Stream to XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Janne

    #1

    Stream to XML

    I have a Stream-object with a serialized Xml-Object.

    How do I load an XmlDocument with the data from the
    Stream-object?

    I have tried the code below but it won't work.

    Try 1.
    XmlDocument myXmlDoc = new XmlDocument();
    myXmlDoc.Load(m yStream);

    Try 2.
    XmlTextReader myXmlTextReader = new XmlTextReader
    (myStream);
    XmlDocument myXmlDoc = new XmlDocument();
    myXmlDoc.Load(m yXmlTextReader) ;


  • Daniel Pratt

    #2
    Re: Stream to XML

    Hi Janne,
    "Janne" <anonymous@disc ussions.microso ft.com> wrote in message
    news:080301c39f de$805e5dd0$a00 1280a@phx.gbl.. .[color=blue]
    > I have a Stream-object with a serialized Xml-Object.
    >
    > How do I load an XmlDocument with the data from the
    > Stream-object?
    >
    > I have tried the code below but it won't work.
    >
    > Try 1.
    > XmlDocument myXmlDoc = new XmlDocument();
    > myXmlDoc.Load(m yStream);
    >
    > Try 2.
    > XmlTextReader myXmlTextReader = new XmlTextReader
    > (myStream);
    > XmlDocument myXmlDoc = new XmlDocument();
    > myXmlDoc.Load(m yXmlTextReader) ;[/color]

    What's the indication that it isn't working?

    Regards,
    Dan


    Comment

    Working...