Results 1 to 2 of 2

Thread: Can't load xml from string (.loadXml)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    107

    Unhappy Can't load xml from string (.loadXml)

    Hi guy's, I am well and truly stuck as to why the following code will not load xml into my xmlDocument variable from a string.

    Code:
                            var stringXML = request.responseText;
                                        
                            var xmlDocument = new Windows.Data.Xml.Dom.XmlDocument();
                        
                            xmlDocument.loadXml(stringXML);
    I have triple checked that stringXML has the value that I am expecting, which is a text string.

    This is a javascript html css metro style application. I just don't see why the loadXml function is not populating my xmlDocumet varable with the contents of stringXML. Also I have check the contents of the xmlDocument variable after loadXml has run and it is empty, I also find it weird that I don't get any errors.


    Best Regards, Antony.
    Last edited by anton2k; Jul 27th, 2012 at 08:07 PM.

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: Can't load xml from string (.loadXml)

    You should try a simple xml string containing nearly nothing, it should work. I've even managed to get it working to load a XAML string (since you are posting in the "Metro" subforum,see my blog post.
    Could you post the value of stringXML?
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width