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


     * @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

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

    /**
     * Removes all child elements, with the specified name, from the specified XMLBean.
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

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

        c.toPrevSibling();

        c.removeXml();

        Assert.assertTrue( x.validate() );

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

          if( attributes.getLength() == 0
              && ( cursor.getTextValue() == null || cursor.getTextValue().trim().length() == 0 )
              && XmlUtils.getFirstChildElement( elm ) == null )
          {
            if( cursor.removeXml() )
            {
              removed = true;
              flag = true;
            }
          }
View Full Code Here

    XmlObject[] imports = xmlObject.selectPath( "declare namespace s='" + Constants.XSD_NS + "' .//s:import" );

    for( int c = 0; c < imports.length; c++ )
    {
      XmlCursor cursor = imports[c].newCursor();
      cursor.removeXml();
      cursor.dispose();
    }

    XmlObject[] includes = xmlObject.selectPath( "declare namespace s='" + Constants.XSD_NS + "' .//s:include" );
View Full Code Here

    XmlObject[] includes = xmlObject.selectPath( "declare namespace s='" + Constants.XSD_NS + "' .//s:include" );

    for( int c = 0; c < includes.length; c++ )
    {
      XmlCursor cursor = includes[c].newCursor();
      cursor.removeXml();
      cursor.dispose();
    }
  }

  public static boolean isInstanceOf( SchemaType schemaType, SchemaType baseType )
View Full Code Here

    c.removeXmlContents();
    c.toFirstContentToken();
    c.beginElement( XOP_INCLUDE_QNAME );
    c.insertAttributeWithValue( XOP_HREF_QNAME, "cid:" + contentId );
    c.toNextSibling();
    c.removeXml();
    c.dispose();
  }

  private static Attachment buildMulitpartAttachment( Attachment[] attachments )
  {
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.