Hi Peter,

try this:

     var req = new qx.io.request.Xhr('my.xml');
     req.addListener('success', function(e) {
        var xmlFile = e.getTarget().getResponse();
        var xmlDocument = qx.xml.Document.fromString(xmlFile);
     }, this);
     req.send();

xmlDocument should contain the dom tree.

Regards
Dietrich


Am 22.12.2015 um 16:40 schrieb Greve, Peter:
> Hey,
> I've just started using qx
> and now fighting with the handling of a xml file.
>
> So I'd like to read some data out of an existing xml file.
> Sounds very simple, but I can not find the right handle.
> What to do ?
>
> I tried
>      var req = new qx.io.request.Xhr('my.xml');
>      req.addListener('success', function(e) {
>         var xmlFile = e.getTarget().getResponse();   ??
>      }, this);
>      req.send();
>
> This code loads the xml file and shows the plain text.
> But it does not give a valid xml document to use the static function 
> qx.xml.Element.getSingleNodeText(xmlFile, 'data').
>
> How to connect qx.io.request.Xhr and qx.xml.Element ?
> Or isn't qx.io.request.Xhr not the best tool to read data from a xml file 
> node ?
>
> thanks
> Peter
>
> ------------------------------------------------------------------------------
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to