Package org.apache.xmlbeans

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


                    cursor.pop();
                    cursor.push();
                    if (cursor.toChild(this.namespace, "security-realm-name")) {
                        XmlCursor other = cursor.newCursor();
                        try {
                            other.toParent();
                            if (other.toChild(SYSTEM_NAMESPACE, "gbean")) {
                                other.toPrevToken();
                            } else {
                                other.toEndToken();
                                other.toPrevToken();
View Full Code Here


    {
        XmlCursor c = o.newCursor();

        try
        {
            while ( c.toParent() )
            {
                o = c.getObject();

                if (o.schemaType().equals(Schema.type))
                    return (Schema) o;
View Full Code Here

    {
        XmlCursor cur = newCursor();
        if (cur == null)
            return false;

        boolean result = !cur.toParent();
        cur.dispose();
        return result;
    }

    /**
 
View Full Code Here

                for (int i = 0 ; c.toNextSelection() ; i++)
                {
                    if ((selections[ i ] = c.getObject()) == null)
                    {
                        if ( !c.toParent() || (selections[ i ] = c.getObject()) == null )
                        throw
                            new XmlRuntimeException(
                                "Path must select only elements " +
                                    "and attributes" );
                    }
View Full Code Here

    }
   
    private static final String formatQName(XmlCursor xmlc, QName qName)
    {
        XmlCursor parent = xmlc.newCursor();
        parent.toParent();
        String prefix = parent.prefixForNamespace(qName.getNamespaceURI());
        parent.dispose();
        String name;
        if (prefix == null || prefix.length() == 0)
            name = qName.getLocalPart();
View Full Code Here

                XmlCursor cur = ((XmlObject)_obj).newCursor();
                if (cur != null)
                {
                    if (cur.currentTokenType() == XmlCursor.TokenType.ATTR)
                        cur.toParent();
                    try { return cur.namespaceForPrefix(prefix); }
                    finally { cur.dispose(); }
                }
            }
           
View Full Code Here

                for (int i = 0 ; c.toNextSelection() ; i++)
                {
                    if ((selections[ i ] = c.getObject()) == null)
                    {
                        if ( !c.toParent() || (selections[ i ] = c.getObject()) == null )
                        throw
                            new XmlRuntimeException(
                                "Path must select only elements " +
                                    "and attributes" );
                    }
View Full Code Here

    {
        XmlCursor cur = newCursor();
        if (cur == null)
            return false;

        boolean result = !cur.toParent();
        cur.dispose();
        return result;
    }

    /**
 
View Full Code Here

    {
        XmlCursor c = o.newCursor();

        try
        {
            while ( c.toParent() )
            {
                o = c.getObject();

                if (o.schemaType().equals(Schema.type))
                    return (Schema) o;
View Full Code Here

                if (attValue.indexOf(':') > 0)
                    prefix = attValue.substring(0, attValue.indexOf(':'));
                else
                    prefix = "";
                cursor.push();
                cursor.toParent();
                valUri = cursor.namespaceForPrefix(prefix);
                cursor.pop();
                attrList.add(new AttributeImpl(name, attValue, valUri)); //add the attribute
            }
            hasAttributes = cursor.toNextAttribute();
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.