Package org.xmldb.api.base

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


            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

        // 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

                    XMLResource      res  = null;

                    log( "Writing results to directory " + destDir.getAbsolutePath(), Project.MSG_DEBUG );

                    while( iter.hasMoreResources() ) {
                        res = (XMLResource)iter.nextResource();
                        log( "Writing resource " + res.getId(), Project.MSG_DEBUG );
                        writeResource( res, destDir );
                    }

                } else if( outputproperty != null ) {
View Full Code Here

                    final ResourceIterator iter   = results.getIterator();
                    XMLResource      res    = null;
                    String           result = null;

                    while( iter.hasMoreResources() ) {
                        res    = (XMLResource)iter.nextResource();
                        result = res.getContent().toString();
                    }
                    getProject().setNewProperty( outputproperty, result );
                }
            }
View Full Code Here

                    XMLResource      res  = null;

                    log( "Writing results to directory " + destDir.getAbsolutePath(), Project.MSG_DEBUG );

                    while( iter.hasMoreResources() ) {
                        res = (XMLResource)iter.nextResource();
                        log( "Writing resource " + res.getId(), Project.MSG_DEBUG );
                        writeResource( res, destDir );
                    }

                } else if( outputproperty != null ) {
View Full Code Here

                        final ResourceIterator iter   = results.getIterator();
                        XMLResource      res    = null;
                        final StringBuffer     result = new StringBuffer();

                        while( iter.hasMoreResources() ) {
                            res = (XMLResource)iter.nextResource();
                            result.append( res.getContent().toString() );
                            result.append( "\n" );
                        }
                        getProject().setNewProperty( outputproperty, result.toString() );
                    }
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

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.