Examples of toFirstContentToken()


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

      // Element has attributes or children, must be complexType
      ComplexType newType = new ComplexType( schema, context.getName(), completed );
      newType.setContent( empty );
      return newType;
    }
    cursor.toFirstContentToken();
    if( empty.validate( context ) != empty )
    {
      // Element has simple content, must be simpleType
      String value = cursor.getTextValue();
      XmlAnySimpleType simpleType;
View Full Code Here

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

      return new ComplexType( schema, context.getName(), completed );
    }
    else if( !context.getAttribute( "nil" ).equals( "true" ) )
    {
      String value = "";
      cursor.toFirstContentToken();
      if( !cursor.isEnd() )
        value = cursor.getTextValue();
      if( TypeInferrer.validateSimpleType( value, simpleType ) )
        return this;
      XmlAnySimpleType newType = TypeInferrer.expandTypeForValue( value, simpleType );
View Full Code Here

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

      // XmlObject object = XmlObject.Factory.parse(
      // makeConnectionMessageContent );
      XmlObject object = XmlUtils.createXmlObject( makeConnectionMessageContent );
      XmlCursor cursor = object.newCursor();

      cursor.toFirstContentToken();
      cursor.toFirstChild();
      cursor.toNextSibling();

      cursor.toNextToken();
      cursor.insertNamespace( "wsmc", WSMC_NAMESPACE );
View Full Code Here

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

      Response response = wsdlSubmit.getResponse();
      String responseContent = response.getContentAsString();
      // XmlObject xml = XmlObject.Factory.parse( responseContent );
      XmlObject xml = XmlUtils.createXmlObject( responseContent );
      XmlCursor cursor = xml.newCursor();
      cursor.toFirstContentToken();
      cursor.toFirstChild();
      cursor.toNextSibling();
      cursor.toFirstChild();

      String sequenceIdentifier = cursor.getTextValue();
View Full Code Here

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

      XmlObject[] detail = xmlObject.selectPath( "//detail" );
      if( detail.length > 0 )
      {
        cursor = detail[0].newCursor();

        cursor.toFirstContentToken();

        generator.setTypeComment( true );
        generator.setIgnoreOptional( iface.getSettings().getBoolean(
            WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS ) );
View Full Code Here

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

  private static void buildXopInclude( XmlCursor cursor, String contentId )
  {
    // build xop:Include
    XmlCursor c = cursor.newCursor();
    c.removeXmlContents();
    c.toFirstContentToken();
    c.beginElement( XOP_INCLUDE_QNAME );
    c.insertAttributeWithValue( XOP_HREF_QNAME, "cid:" + contentId );
    c.toNextSibling();
    c.removeXml();
    c.dispose();
View Full Code Here

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

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

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

        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

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

    private void doTest(String text) throws XmlException, DeploymentException {
        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());
    }
View Full Code Here

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

       
        x = XmlObject.Factory.parse( "<a xmlns='foo'/>" );

        XmlCursor c = x.newCursor();

        c.toFirstContentToken();
        c.toFirstContentToken();

        c.insertElement( "b" );
        c.toPrevSibling();
        Assert.assertTrue( c.getName().getLocalPart().equals( "b" ) );
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.