Hello !

 

 

We want to fill a JTree with xquery-result, like

<A  attr=”a1”>

   <B    attr=”b1”>

   </B>

</A>

 

 

 

This returns lines:

 

      ResourceSet set = service.query(QUERY);

      ResourceIterator iter = set.getIterator();

      while(iter.hasMoreResources()) {

        Resource res = iter.nextResource();

        System.out.println(res.getContent());

      }

 

 

This returns the XML-structure:

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

      factory.setNamespaceAware(true);

      DocumentBuilder builder = null;

      Document doc = null;

 

      try {

            builder = factory.newDocumentBuilder();

            doc = builder.parse(XMLFile);

      } catch (xx)

           

      NodeList nodeList = doc.getChildNodes();

 

I need something like NodeList (JAXP), to iterate through xml-structure.

How to do this with BaseX ?

 

With best regards

Michael