Package org.apache.xmlbeans

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


            curs.toFirstContentToken();
        }

        if (curs.isStart())
        {
            if (curs.toFirstAttribute())
            {
                do
                {
                    if (qnameMatches(xmlName, curs.getName()))
                    {
View Full Code Here

            // TODO: Cover the case *::name
            if (name.localName().equals("*"))
            {
                // Delete all attributes.
                if (curs.toFirstAttribute())
                {
                    while (curs.currentTokenType().isAttr())
                    {
                        curs.removeXml();
                    }
View Full Code Here

                        return this;
                    }

                    // Check the attributes
                    cursor.push();
                    boolean hasNext = cursor.toFirstAttribute();
                    while(hasNext)
                    {
                        n = NamespaceHelper.getNamespace(lib, cursor, inScopeNS);
                        if(nsURI.equals(n.uri()) &&
                           (nsPrefix == null ||
View Full Code Here

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

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

            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

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.