Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlCursor.toFirstContentToken()


            {
                return null;
            }
        };
        XmlCursor c = org.apache.xmlbeans.XmlObject.Factory.parse(xml).newCursor();
        c.toFirstContentToken(); // on <root>
        c.toFirstContentToken(); // on <a>
        c.toFirstChild();        // on <b>
        c.toFirstChild();        // on <c>
        c.push(); System.out.println(generateXPath(c, null, ns)); c.pop();
        c.toNextSibling();
View Full Code Here


                return null;
            }
        };
        XmlCursor c = org.apache.xmlbeans.XmlObject.Factory.parse(xml).newCursor();
        c.toFirstContentToken(); // on <root>
        c.toFirstContentToken(); // on <a>
        c.toFirstChild();        // on <b>
        c.toFirstChild();        // on <c>
        c.push(); System.out.println(generateXPath(c, null, ns)); c.pop();
        c.toNextSibling();
        c.toNextSibling();       // on the last <c>
View Full Code Here

                }
            }
        }
        // Copy the content into the XmlAttributeType
        XmlCursor loginCursor = lcDoc.newCursor();
        loginCursor.toFirstContentToken();
        XmlCursor destination = config.newCursor();
        destination.toNextToken();
        loginCursor.moveXml(destination);
        loginCursor.dispose();
        destination.dispose();
View Full Code Here

        GeronimoSecurityBuilderImpl secBuilder = new GeronimoSecurityBuilderImpl(null, null, null);
        secBuilder.doStart();
        LoginConfigBuilder builder = new LoginConfigBuilder(new Jsr77Naming(), null);
        XmlObject xmlObject = XmlBeansUtil.parse(text);
        XmlCursor cursor = xmlObject.newCursor();
        cursor.toFirstContentToken();
        xmlObject = cursor.getObject();
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1.0/car")), null, ConfigurationModuleType.SERVICE, new Jsr77Naming(), new MockConfigurationManager(), Collections.emptySet());
        AbstractName parentName = new AbstractName(URI.create("test/foo/1.0/car?name=parent,j2eeType=foo"));
        builder.getReferences(xmlObject, context, parentName, getClass().getClassLoader());
        secBuilder.doStop();
View Full Code Here

                }
            }
        }
        // Copy the content into the XmlAttributeType
        XmlCursor loginCursor = lcDoc.newCursor();
        loginCursor.toFirstContentToken();
        XmlCursor destination = config.newCursor();
        destination.toNextToken();
        loginCursor.moveXml(destination);
        loginCursor.dispose();
        destination.dispose();
View Full Code Here

        GeronimoSecurityBuilderImpl secBuilder = new GeronimoSecurityBuilderImpl(null, null, null);
        secBuilder.doStart();
        LoginConfigBuilder builder = new LoginConfigBuilder(new Jsr77Naming(), null);
        XmlObject xmlObject = XmlBeansUtil.parse(text);
        XmlCursor cursor = xmlObject.newCursor();
        cursor.toFirstContentToken();
        xmlObject = cursor.getObject();
        HashMap<String, Artifact> locations = new HashMap<String, Artifact>();
        locations.put(null, Artifact.create("test/foo/1.0/car"));
        BundleContext bundleContext = new MockBundleContext(getClass().getClassLoader(), "", new HashMap<Artifact, ConfigurationData>(), locations);
        DeploymentContext context = new DeploymentContext(new File("."), null, new Environment(Artifact.create("test/foo/1.0/car")), null, ConfigurationModuleType.SERVICE, new Jsr77Naming(), new MockConfigurationManager(), Collections.<Repository>emptySet(), bundleContext);
View Full Code Here

        if (errors.size() != 0) {
            throw new XmlException(errors.toArray().toString());
        }
        XmlCursor cursor = parsed.newCursor();
        try {
            cursor.toFirstContentToken();
            for (Iterator namespaces = namespaceMap.entrySet().iterator(); namespaces.hasNext();) {
                Map.Entry entry = (Map.Entry) namespaces.next();
                cursor.insertNamespace((String) entry.getKey(), (String) entry.getValue());
            }
        } finally {
View Full Code Here

    try {
      parser.parse(new InputSource(html));
      XmlObject xmlBean = XmlObject.Factory.parse(parser.getDocument().getDocumentElement());
      XmlCursor cursor = xmlBean.newCursor();
      cursor.toFirstContentToken();
      cursor.selectPath("//SCRIPT[@type = 'application/rdf+n3']");
      while(cursor.hasNextSelection()) {
        cursor.toNextSelection();
        model.read(new StringReader(cursor.getTextValue()), "", "N3");
      }
View Full Code Here

      cursor.selectPath("//SCRIPT[@type = 'application/rdf+n3']");
      while(cursor.hasNextSelection()) {
        cursor.toNextSelection();
        model.read(new StringReader(cursor.getTextValue()), "", "N3");
      }
      cursor.toFirstContentToken();
      cursor.selectPath("//SCRIPT[@type = 'text/turtle']");
      while(cursor.hasNextSelection()) {
        cursor.toNextSelection();
        model.read(new StringReader(cursor.getTextValue()), "", "TTL");
      }
View Full Code Here

            final String faultName = faultPart.getName() ;
            final SampleXmlUtil generator = new SampleXmlUtil(false) ;
            generator.setExampleContent(false) ;
            generator.setTypeComment(false) ;
            final XmlCursor cursor = detail.newCursor();
            cursor.toFirstContentToken() ;
            generator.setTypeComment(true) ;
            generator.setIgnoreOptional(wsdlOperation.getInterface().getSettings().getBoolean( WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS ) );
            for(Part part: faultPart.getWsdlParts())
            {
                try
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.