# Visual Basic > Universal Windows Platform and Modern Windows Experience >  Can't load xml from string (.loadXml)

## anton2k

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.



```
                        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.

----------


## Lightning

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?

----------

