Package org.apache.xmlbeans

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


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

        c.toPrevSibling();

        c.removeXml();

        Assert.assertTrue( x.validate() );

        base.changeType( stl.findType( new QName( "derived" ) ) );
View Full Code Here


        XmlObject x = XmlObject.Factory.parse( "<foo/>" );
        XmlCursor c = x.newCursor();
        c.toNextToken();
        MyAnno a = new MyAnno();
        c.setBookmark( a );
        Assert.assertTrue( c.removeXml() );
        XmlCursor c2 = a.createCursor();
        Assert.assertTrue( c2 == null );
    }
   
    public void testAttrSetter ( )
View Full Code Here

                    XmlCursor cursor = xo.newCursor();
                    // strip comments out, as xmlbeans doesn't
                    // seem to like them
                    do {
                        if (cursor.isComment()) {
                            cursor.removeXml();
                        }
                    } while (cursor.toNextToken() != XmlCursor.TokenType.NONE);
                    cursor.dispose();          
                    inDoc = Context.toObject(xo, scope);
                    Object[] args = {inDoc};
View Full Code Here

                        GerConnectiondefinitionInstanceType connectiondefinitionInstance = connectiondefinitionInstances[k];
                        cursor = connectiondefinitionInstance.newCursor();
                        try {
                            if (cursor.toFirstChild()) {
                                if (cursor.toNextSibling(GLOBAL_JNDI_NAME_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                                if (cursor.toNextSibling(CREDENTIAL_INTERFACE_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
View Full Code Here

                                if (cursor.toNextSibling(GLOBAL_JNDI_NAME_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                                if (cursor.toNextSibling(CREDENTIAL_INTERFACE_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                            }
                        } finally {
                            cursor.dispose();
View Full Code Here

                        }
                    }
                    textPos++;
                }
                else if(o instanceof CTProofErr){
                    c.removeXml();
                }
                else if(o instanceof CTRPr);
                    //do nothing
                else
                    candCharPos=0;
View Full Code Here

    * @param xBean an XMLBean
    */
   public static void remove( XmlObject xBean )
   {
      XmlCursor xCursor = xBean.newCursor(  );
      xCursor.removeXml(  );

      xCursor.dispose(  );
   }

   /**
 
View Full Code Here

      XmlCursor xCursor = xBean.newCursor(  );
      for ( boolean hasNext = xCursor.toFirstChild(  ); hasNext; hasNext = xCursor.toNextSibling(  ) )
      {
         if ( ( name == null ) || getName( xCursor ).equals( name ) )
         {
            succeeded = succeeded && xCursor.removeXml(  );
         }
      }

      xCursor.dispose(  );
      return succeeded;
View Full Code Here

                        GerConnectiondefinitionInstanceType connectiondefinitionInstance = connectiondefinitionInstances[k];
                        cursor = connectiondefinitionInstance.newCursor();
                        try {
                            if (cursor.toFirstChild()) {
                                if (cursor.toNextSibling(GLOBAL_JNDI_NAME_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                                if (cursor.toNextSibling(CREDENTIAL_INTERFACE_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
View Full Code Here

                                if (cursor.toNextSibling(GLOBAL_JNDI_NAME_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                                if (cursor.toNextSibling(CREDENTIAL_INTERFACE_QNAME)) {
                                    cursor.removeXml();
                                    updated = true;
                                }
                            }
                        } finally {
                            cursor.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.