SL4: Root element is missing

Posted by Number8 on Stack Overflow See other posts from Stack Overflow or by Number8
Published on 2010-05-27T02:35:47Z Indexed on 2010/05/27 2:41 UTC
Read the original article Hit count: 331

Filed under:
|

Hello,
I know this has been asked elsewhere, but none of the questions or answers helped.
I open an xml file in my SL 4 app:

StreamResouceInfo sri =  Application.GetResourceStream(new System.Uri("z.xml", UriKind.Relative));
if (null != sri)
{
    XDocument xDoc = XDocument.Load(sri.Stream);
}

"Root element is missing" exception.

The xml:
Hmm, can't seem to post the xml... It is well-formed and valid, with a single root node and all tags closed. Thanks for any hints...

© Stack Overflow or respective owner

Related posts about Xml

Related posts about silverlight-4.0