Package org.apache.xmlbeans

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


                }

                // Skip over child elements
                if (tt.isStart())
                {
                    tt = curs.toEndToken();
                }

                tt = curs.toNextToken();
            }
        }
View Full Code Here


        }

        // Move the cursor to the end of this element
        if (curs.isStart())
        {
            curs.toEndToken();
        }

        insertChild(curs, xml);

        curs.dispose();
View Full Code Here

                        }
                    }
                    cursor.pop();
                    if(defaultNSDeclared)
                    {
                        cursor.toEndToken();
                        continue;
                    }

                    // Check if this element's name is in no namespace
                    javax.xml.namespace.QName qname = cursor.getName();
View Full Code Here

            // See http://xmlbeans.apache.org/docs/2.0.0/guide/conHandlingAny.html
            XmlCursor xsAnyCursor = webAppDocument.newCursor();
            xsAnyCursor.toNextToken();
            XmlCursor rootCursor = newModule.newCursor();
            rootCursor.toEndToken();
            xsAnyCursor.moveXml(rootCursor);
            xsAnyCursor.dispose();
            rootCursor.dispose();
        }
        for (Enumeration<String> e = ejbModules.keys(); e.hasMoreElements();) {
View Full Code Here

        cursor.push();
        XmlCursor end = cursor.newCursor();

        try {
            end.toCursor(cursor);
            end.toEndToken();

            while (cursor.hasNextToken() && cursor.isLeftOf(end)) {
                if (cursor.isStart()) {
                    if (!namespace.equals(cursor.getName().getNamespaceURI())) {
                        cursor.setName(new QName(namespace, cursor.getName().getLocalPart()));
View Full Code Here

            // Add a cursor the new element and put it between its START and END
            // tokens, where new values can be inserted.
            XmlCursor namesCursor = namesElement.newCursor();
            namesCursor.toFirstContentToken();
            namesCursor.toEndToken();

            // Loop through the selections, appending the incoming <name> element's
            // value to the new <name> element's value. (Of course, this could have
            // been done with a StringBuffer, but that wouldn't show the cursor in
            // use.)
View Full Code Here

                switch (token)
                {
                    case TokenType.INT_START:
                        if (seenElement) return true;
                        seenElement = true;
                        token = c.toEndToken().intValue();
                        break SWITCH;

                    case TokenType.INT_TEXT:
                        if (! Splay.isWhiteSpace(c.getChars()))
                            return true;
View Full Code Here

        // _firstToken = ((JavelinAnnotation)cur.getAnnotation(JavelinAnnotation.class)).getStartToken();

        // now peek at the end tag (it may be unplaced for the <a/> case, so use the start tag if needed
        cur.toCursor(cursor);
        // _lastToken = ((JavelinAnnotation)cur.getAnnotation(JavelinAnnotation.class)).getEndToken();
        cur.toEndToken();
        // JavelinAnnotation endAnn = (JavelinAnnotation)cur.getAnnotation(JavelinAnnotation.class);
        // if (endAnn != null)
        //    _lastToken = endAnn.getEndToken();
    }
View Full Code Here

        c.toFirstChild();

        XmlObject base = c.getObject();

        c.toEndToken();
        c.insertElement( "bar" );

        Assert.assertTrue( !x.validate() );

        c.toPrevSibling();
View Full Code Here

                        int oldCount = dcb.getAdminObjectInstance().length;
                        for (int j = 0; j < array.length; j++) {
                            GerAdminobjectInstanceType instance = array[j];
                            XmlCursor source = instance.newCursor();
                            XmlCursor dest = old.newCursor();
                            dest.toEndToken();
                            if(!source.moveXml(dest)) {
                                throw new RuntimeException("Unable to move admin object instance");
                            }
                            source.dispose();
                            dest.dispose();
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.