Package org.xmldb.api.base

Examples of org.xmldb.api.base.ResourceIterator.nextResource()


        if (i.hasMoreResources()) {
          Class c = getManager().getHandlerClass();
          JMHandler handler = (JMHandler) c.newInstance();
          handler.setObserver(pObserver);
          while(i.hasMoreResources()) {
            XMLResource r = (XMLResource) i.nextResource();
            r.getContentAsSAX(handler);
          }
        }
      }
    } catch (IllegalAccessException e) {
View Full Code Here


            IncludeXMLConsumer includeHandler = new IncludeXMLConsumer(handler);

            // Print search results
            ResourceIterator results = resultSet.getIterator();
            while (results.hasMoreResources()) {
                XMLResource result = (XMLResource)results.nextResource();

                final String id = result.getId();
                final String documentId = result.getDocumentId();

                attributes.clear();
View Full Code Here

      ResourceIterator i = result.getIterator();
      if (i.hasMoreResources()) {
        JMUnmarshallerHandler handler = (JMUnmarshallerHandler) getManager().getFactory().createUnmarshaller().getUnmarshallerHandler();
        handler.setObserver(pObserver);
        while(i.hasMoreResources()) {
          XMLResource r = (XMLResource) i.nextResource();
          r.getContentAsSAX(handler);
        }
      }
    }
  } catch (XMLDBException e) {
View Full Code Here

            IncludeXMLConsumer includeHandler = new IncludeXMLConsumer(handler);

            // Print search results
            ResourceIterator results = resultSet.getIterator();
            while (results.hasMoreResources()) {
                XMLResource result = (XMLResource)results.nextResource();

                final String id = result.getId();
                final String documentId = result.getDocumentId();

                attributes.clear();
View Full Code Here

        // Create an XObject to be used in Xpath query
        xo = new XObject();

        // Retrieve the next node
        XMLResource resource = (XMLResource) results.nextResource();

        originalnode = resource.getContentAsDOM();

      }
      catch (Exception e) {
View Full Code Here

            IncludeXMLConsumer includeHandler = new IncludeXMLConsumer(handler);

            // Print search results
            ResourceIterator results = resultSet.getIterator();
            while (results.hasMoreResources()) {
                XMLResource result = (XMLResource)results.nextResource();

                final String id = result.getId();
                final String documentId = result.getDocumentId();

                attributes.clear();
View Full Code Here

        if (i.hasMoreResources()) {
          Class c = getManager().getHandlerClass();
          JMHandler handler = (JMHandler) c.newInstance();
          handler.setObserver(pObserver);
          while(i.hasMoreResources()) {
            XMLResource r = (XMLResource) i.nextResource();
            r.getContentAsSAX(handler);
          }
        }
      }
    } catch (IllegalAccessException e) {
View Full Code Here

            IncludeXMLConsumer includeHandler = new IncludeXMLConsumer(handler);

            // Print search results
            ResourceIterator results = resultSet.getIterator();
            while (results.hasMoreResources()) {
                XMLResource result = (XMLResource)results.nextResource();

                final String id = result.getId();
                final String documentId = result.getDocumentId();

                attributes.clear();
View Full Code Here

            ResourceSet resultSet = service.query(querystring);
            results = resultSet.getIterator();

            while (results.hasMoreResources()) {
                XMLResource resource = (XMLResource) results.nextResource();
                String documentstr = (String) resource.getContent();
                System.out.println(documentstr);
            }

        } catch (Exception e) {
View Full Code Here

            XPathQueryService service = (XPathQueryService) collection.getService("XPathQueryService", "1.0");
            ResourceSet resourceSet = service.query(xpath);
            ResourceIterator resourceIterator = resourceSet.getIterator();

            while (resourceIterator.hasMoreResources()) {
                Resource resource = resourceIterator.nextResource();
                System.out.println((String) resource.getContent());
            }
        } catch (XMLDBException e) {
            System.err.println("XML:DB Exception occured " + e.errorCode + " " + e.getMessage());
        } finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.