Package org.apache.xmlbeans

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


     */
    private XMLList matchDescendantChildren(XMLName xmlName)
    {
        XMLList result = new XMLList(lib);
        XmlCursor curs = newCursor();
        TokenType tt = curs.currentTokenType();

        // Set the targets for this XMLList.
        result.setTargets(this, null);

        if (tt.isStartdoc())
View Full Code Here


     */
    private XMLList matchChildren(XmlCursor.TokenType tokenType, XMLName name)
    {
        XMLList result = new XMLList(lib);
        XmlCursor curs = newCursor();
        TokenType tt = curs.currentTokenType();
        javax.xml.namespace.QName qname = new javax.xml.namespace.QName(name.uri(), name.localName());
        javax.xml.namespace.QName targetProperty = qname;

        if (tt.isStartdoc())
        {
View Full Code Here

    {
        int index = 0;

        XmlCursor curs = newCursor();

        TokenType tt = curs.currentTokenType();
        while (true)
        {
            if (tt.isText())
            {
                index++;
View Full Code Here

            else
            {
                break;
            }

            tt = curs.currentTokenType();
        }

        index = curs.currentTokenType().isStartdoc() ? -1 : index;

        curs.dispose();
View Full Code Here

            }

            tt = curs.currentTokenType();
        }

        index = curs.currentTokenType().isStartdoc() ? -1 : index;

        curs.dispose();

        return index;
    }
View Full Code Here

     *
     */
    void normalize()
    {
        XmlCursor curs = newCursor();
        TokenType tt = curs.currentTokenType();

        // Walk through the tokens removing empty text nodes and merging adjacent text nodes.
        if (tt.isStartdoc())
        {
            tt = curs.toFirstContentToken();
View Full Code Here

    static XML createFromXmlObject(XMLLibImpl lib, XmlObject xo)
    {
        XScriptAnnotation anno;
        XmlCursor curs = xo.newCursor();
        if (curs.currentTokenType().isStartdoc())
        {
            curs.toFirstContentToken();
        }
        try {
            anno = new XScriptAnnotation(curs);
View Full Code Here

            // todo: TLL Catch specific exceptions during parse.
            throw ScriptRuntime.typeError("Not Parsable as XML");
        }

        XmlCursor curs = xo.newCursor();
        if (curs.currentTokenType().isStartdoc())
        {
            curs.toFirstContentToken();
        }

        if (isText)
View Full Code Here

        if (curs.isStartdoc())
        {
            curs.toFirstContentToken();
        }

        result = curs.currentTokenType();

        curs.dispose();

        return result;
    }
View Full Code Here

     * @param addToType
     */
    private void insertChild(XML childToMatch, Object xmlToInsert, int addToType)
    {
        XmlCursor curs = newCursor();
        TokenType tt = curs.currentTokenType();
        XmlCursor xmlChildCursor = childToMatch.newCursor();

        if (tt.isStartdoc())
        {
            tt = curs.toFirstContentToken();
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.