Package org.apache.xmlbeans

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


                                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

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

          {
              // Change the phone numbers.
              XmlCursor editCursor = resultCursor.newCursor();
              editCursor.toLastAttribute();
              editCursor.toNextToken();
              editCursor.removeXml();
              editCursor.insertChars("(206)555-1234");
          } while (resultCursor.toNextSibling());

          resultCursor.toStartDoc();
          System.out.println("The query results after changes: \n");
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

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

            "<bar>xy<foo x='y'>abcdef</foo>pqr<foo>123456</foo></bar>" );
       
        cFrom = navDoc( x, "2d" );
        cTo = navDoc( x, "2ds-2c" );
       
        Assert.assertTrue( cFrom.removeXml() );

        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue(
View Full Code Here

        x = XmlObject.Factory.parse( "<bar><!---->abc</bar>" );
       
        cFrom = navDoc( x, "tt" );
        cTo = navDoc( x, "tttc" );
       
        Assert.assertTrue( cFrom.removeXml() );

        cFrom.insertChars( "[FROM]" );
        cTo.insertChars( "[TO]" );

        Assert.assertTrue( x.xmlText().equals( "<bar>[FROM]a[TO]bc</bar>" ) );
View Full Code Here

        fc.setNil();
        Assert.assertTrue( fc.isNil() );
        Assert.assertTrue( x.xmlText().equals( "<canBeNil xsi:nil=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>" ) );
        c.toNextToken();
        Assert.assertTrue( c.isAttr() );
        c.removeXml();
        Assert.assertTrue( x.xmlText().equals( "<canBeNil/>" ) );
        Assert.assertTrue( ! fc.isNil() );
    }
   
   
View Full Code Here

    public void removeXml ( )
    {
        XmlCursor c = getCursor();

        if (!c.isStartdoc() && !c.isFinish())
            c.removeXml();
    }

    public static class Bookmark extends XmlCursor.XmlBookmark
    {
    }
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.