Package org.apache.xmlbeans

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


   
    ApplicationType application = getOrCreateApplication(value);
   
    if (getSPMDApplication(value) == null) {
      XmlCursor acursor = application.newCursor();
      acursor.toEndToken();
      acursor.insertElement(SPMD_APPLICATION);
      acursor.dispose();
    }
    return getSPMDApplication(value);
  }
View Full Code Here


      return getHPCProfileApplication(value);
    }
   
    if (getHPCProfileApplication(value) == null) {
      XmlCursor acursor = application.newCursor();
      acursor.toEndToken();
      acursor.insertElement(HPC_PROFILE_APPLICATION);
      acursor.dispose();
    }
    return getHPCProfileApplication(value);
  }
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

                location.push();
                XmlCursor end = null;
                try {
                    end = location.newCursor();
                    end.toCursor(location);
                    end.toEndToken();
                    SchemaConversionUtils.convertSchemaVersion(location, end, SchemaConversionUtils.JPA_PERSISTENCE_NAMESPACE, "http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd", "2.0");
                } finally {
                    if (end != null) {
                        try {
                            end.dispose();
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: switch (token) {
                    case TokenType.INT_START:
                        if (seenElement)
                            return true;
                        seenElement = true;
                        token = c.toEndToken().intValue();
                        break SWITCH;

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

                        try {
                            other.toParent();
                            if (other.toChild(SYSTEM_NAMESPACE, "gbean")) {
                                other.toPrevToken();
                            } else {
                                other.toEndToken();
                                other.toPrevToken();
                            }
                            cursor.moveXml(other);
                            cursor.pop();
                            cursor.push();
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

                }

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

                tt = curs.toNextToken();
            }
        }
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.