Package org.apache.xmlbeans

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


                                 String value )
    {
        XmlCursor xCursor = xBean.newCursor();
        if ( xCursor.isStartdoc() )
        {
            xCursor.toFirstChild();
        }
        xCursor.setTextValue( value );
        xCursor.dispose();
    }
View Full Code Here


     */
    public static Map getXmlBeanAnyMap( XmlObject xmlObjectToSearch )
    {
        Map qnameToListMap = new HashMap();
        XmlCursor xCursor = xmlObjectToSearch.newCursor();
        for ( boolean hasNext = xCursor.toFirstChild(); hasNext; hasNext = xCursor.toNextSibling() )
        {
            XmlObject siblingXmlObject = xCursor.getObject();
            QName siblingXmlObjectQname = siblingXmlObject.schemaType().getName();

            // TODO: should this be tested against the original bean
View Full Code Here

                                               QName name )
    {
        boolean succeeded = true;
        xBean = getRootElement( xBean );
        XmlCursor xCursor = xBean.newCursor();
        for ( boolean hasNext = xCursor.toFirstChild(); hasNext; hasNext = xCursor.toNextSibling() )
        {
            if ( name == null || getName( xCursor ).equals( name ) )
            {
                succeeded = succeeded && xCursor.removeXml();
            }
View Full Code Here

                stl.parse( (String) validInstances[ i ], null, options );

            if (!startOnDocument)
            {
                XmlCursor c = x.newCursor();
                c.toFirstChild();
                x = c.getObject();
                c.dispose();
            }
           
            List xel = new ArrayList();
View Full Code Here

                x = stl.parse( (String) invalidInstances[ i ], null, options );

                if (! startOnDocument)
                {
                    XmlCursor c = x.newCursor();
                    c.toFirstChild();
                    x = c.getObject();
                    c.dispose();
                }

                boolean isValid = x.validate();
View Full Code Here

        Assert.assertTrue( x.validate() );

        XmlCursor c = x.newCursor();

        c.toFirstChild();

        XmlObject base = c.getObject();

        c.toEndToken();
        c.insertElement( "bar" );
View Full Code Here

        if (baseType != null)
            baseModel = baseType.getAttributeModel();

        XmlCursor cur = parseTree.newCursor();

        for (boolean more = cur.toFirstChild(); more; more = cur.toNextSibling())
        {
            switch (translateAttributeCode(cur.getName()))
            {
                case ATTRIBUTE_CODE:
                {
View Full Code Here

                    return null;
                }
               
                // no go to the child.
                XmlCursor cur = group.getParseObject().newCursor();
                for (boolean more = cur.toFirstChild(); more; more = cur.toNextSibling())
                {
                    particleCode = translateParticleCode(cur.getName());
                    if (particleCode != 0)
                    {
                        parseTree = parseGroup = (Group)cur.getObject();
View Full Code Here

        if (hasChildren)
        {
            XmlCursor cur = parseTree.newCursor();
            List accumulate = new ArrayList();
            for (boolean more = cur.toFirstChild(); more; more = cur.toNextSibling())
            {
                int code = translateParticleCode(cur.getName());
                if (code == 0)
                    continue;
                addMinusPointlessParticles(accumulate,
View Full Code Here

        List patterns = null;

        if (restriction != null)
        {
            XmlCursor cur = restriction.newCursor();
            for (boolean more = cur.toFirstChild(); more; more = cur.toNextSibling())
            {
                int code = translateFacetCode(cur.getName());
                if (code == -1)
                    continue;
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.