Package org.apache.xmlbeans

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


        XmlCursor c = getCursor();

        if (c.isAnyAttr() || c.isStartdoc())
            return;
       
        c.insertElement( getQName() );
    }

    public void insertAttr ( )
    {
        XmlCursor c = getCursor();
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

        Assert.assertTrue( x.validate() );

        base.changeType( stl.findType( new QName( "derived" ) ) );

        c.insertElement( "bar" );

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

    // Tests abstract & block attributes on ComplexType
View Full Code Here

        c = x.newCursor();

        c.toNextToken();

        c.insertElement( "foo" );
        c.insertChars( "x" );
       
        testTextFrag( x.xmlText(), "<foo/>x" );
       
        //
View Full Code Here

        c = x.newCursor();

        c.toNextToken();

        c.insertElement( "foo" );
        c.insertElement( "bar" );
       
        testTextFrag( x.xmlText(), "<foo/><bar/>" );
    }
   
View Full Code Here

        c = x.newCursor();

        c.toNextToken();

        c.insertElement( "foo" );
        c.insertElement( "bar" );
       
        testTextFrag( x.xmlText(), "<foo/><bar/>" );
    }
   
    public void testLoad ( )
View Full Code Here

      else // childless
      {
         parentCursor.toEndToken(  );
      }

      parentCursor.insertElement( name );
      parentCursor.toPrevSibling(  );
      XmlObject newChild = parentCursor.getObject(  );
      parentCursor.dispose(  );
      return newChild;
   }
View Full Code Here

    }
   
    if (getHPCProfileApplication(value) == null) {
      XmlCursor acursor = application.newCursor();
      acursor.toEndToken();
      acursor.insertElement(HPC_PROFILE_APPLICATION);
      acursor.dispose();
    }
    return getHPCProfileApplication(value);
  }
View Full Code Here

    }
   
    if (getPOSIXApplication(value) == null) {
      XmlCursor acursor = application.newCursor();
      acursor.toEndToken();
      acursor.insertElement(POSIX_APPLICATION);
      acursor.dispose();
    }
    return getPOSIXApplication(value);
  }
View Full Code Here

    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

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.