Examples of toFirstAttribute()


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

        try
        {
            if (!xc.isContainer())
                return null;

            if (xc.toFirstAttribute())
            {
                //look for attributes
                do
                {
                    if (xc.getName().equals(attributeName))
View Full Code Here

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

            if (!xc.isContainer())
                return EMPTY_RESULT;

            List result = new ArrayList();

            if (xc.toFirstAttribute())
            {
                //look for attributes
                do
                {
                    if (attributeNameSet.contains(xc.getName()))
View Full Code Here

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

      // TODO: Check with ConflictHandler
      mixed = true;
    }
    cursor.pop();
    cursor.push();
    if( cursor.toFirstAttribute() )
    {
      do
      {
        QName qname = cursor.getName();
        if( attributes.containsKey( qname ) )
View Full Code Here

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

  }

  public Type validate( Context context ) throws XmlException
  {
    XmlCursor cursor = context.getCursor();
    if( !cursor.isAttr() && ( cursor.toFirstAttribute() || cursor.toFirstChild() ) )
    {
      // Element has attributes or children, must be complexType
      ComplexType newType = new ComplexType( schema, context.getName(), completed );
      newType.setContent( empty );
      return newType;
View Full Code Here

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

  }

  public Type validate( Context context ) throws XmlException
  {
    XmlCursor cursor = context.getCursor();
    if( !cursor.isAttr() && ( cursor.toFirstAttribute() || cursor.toFirstChild() ) )
    {
      // Element with complex content
      return new ComplexType( schema, context.getName(), completed );
    }
    else if( !context.getAttribute( "nil" ).equals( "true" ) )
View Full Code Here

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

                QName attrName = null;

                XmlCursor c = createCursor();

                if (c.toFirstAttribute() && !c.toNextAttribute())
                    attrName = c.getName();

                c.dispose();

                if (attrName != null)
View Full Code Here

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

        try
        {
            StringBuffer sb = null;

            if (!c.toFirstAttribute() || c.toNextAttribute())
            {
                sb = new StringBuffer();

                sb.append( "The document is not a " );
                sb.append( QNameHelper.pretty( attrName ) );
View Full Code Here

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

        // ./*
        xc.toNextToken();
        // ./*/notificationSource
        xc.toChild(NOTIFICATION_SRC_QNAME);
        // ./*/notificationSource/@*
        boolean hasAttr = xc.toFirstAttribute();
        while (hasAttr && !WF_TIMESTEP_QNAME.equals(xc.getName())) {
            hasAttr = xc.toNextAttribute();
        }
        if (hasAttr) {
            // ./*/notificationSource/@workflowTimestep
 
View Full Code Here

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

    {
        XmlObject x = XmlObject.Factory.parse( "<a><x/><y/><z/></a>" );
        XmlCursor c = x.newCursor();
        Assert.assertTrue( c.toNextSibling() == false );
        Assert.assertTrue( c.toPrevSibling() == false );
        Assert.assertTrue( c.toFirstAttribute() == false );
        Assert.assertTrue( c.toLastAttribute() == false );
        c.toNextToken();
        c.toNextToken();
        Assert.assertTrue( c.toNextSibling() == true );
        Assert.assertTrue( c.getName().getLocalPart().equals( "y" ) );
View Full Code Here

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

        try
        {
            if (!xc.isContainer())
                return null;

            if (xc.toFirstAttribute())
            {
                //look for attributes
                do
                {
                    if (xc.getName().equals(attributeName))
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.