Package org.apache.xmlbeans

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


        XmlObject o = cursor.getObject();
        if(!(o instanceof CTRow)){
            return null;
        }
        CTRow row = (CTRow)o;
        cursor.toParent();
        o = cursor.getObject();
        cursor.dispose();
        if(! (o instanceof CTTbl)){
            return null;
        }
View Full Code Here


     * verifies that cursor is on the right position
     * @param cursor
     */
    private boolean isCursorInBody(XmlCursor cursor) {
        XmlCursor verify = cursor.newCursor();
        verify.toParent();
        try {
            return (verify.getObject() == this.ctDocument.getBody());
        } finally {
            verify.dispose();
        }
View Full Code Here

     * get the TableCell which belongs to the TableCell
     * @param cell
     */
    public XWPFTableCell getTableCell(CTTc cell) {
        XmlCursor cursor = cell.newCursor();
        cursor.toParent();
        XmlObject o = cursor.getObject();
        if(!(o instanceof CTRow)){
            return null;
        }
        CTRow row = (CTRow)o;
View Full Code Here

        XmlObject o = cursor.getObject();
        if(!(o instanceof CTRow)){
            return null;
        }
        CTRow row = (CTRow)o;
        cursor.toParent();
        o = cursor.getObject();
        cursor.dispose();
        if(! (o instanceof CTTbl)){
            return null;
        }
View Full Code Here

    /**
     * verifies that cursor is on the right position
     */
    private boolean isCursorInTableCell(XmlCursor cursor) {
  XmlCursor verify = cursor.newCursor();
  verify.toParent();
  if(verify.getObject() == this.ctTc){
      return true;
  }
  return false;
    }
View Full Code Here

    /**
     * get the TableCell which belongs to the TableCell
     */
    public XWPFTableCell getTableCell(CTTc cell) {
  XmlCursor cursor = cell.newCursor();
  cursor.toParent();
  XmlObject o = cursor.getObject();
  if(!(o instanceof CTRow)){
      return null;
  }
  CTRow row = (CTRow)o;
View Full Code Here

  XmlObject o = cursor.getObject();
  if(!(o instanceof CTRow)){
      return null;
  }
  CTRow row = (CTRow)o;
  cursor.toParent();
  o = cursor.getObject();
  cursor.dispose();
  if(! (o instanceof CTTbl)){
      return null;
  }
View Full Code Here

                    cursor.pop();
                    cursor.push();
                    if (cursor.toChild(this.namespace, "security-realm-name")) {
                        XmlCursor other = cursor.newCursor();
                        try {
                            other.toParent();
                            if (other.toChild(SYSTEM_NAMESPACE, "gbean")) {
                                other.toPrevToken();
                            } else {
                                other.toEndToken();
                                other.toPrevToken();
View Full Code Here

                for (int i = 0 ; c.toNextSelection() ; i++)
                {
                    if ((selections[ i ] = c.getObject()) == null)
                    {
                        if ( !c.toParent() || (selections[ i ] = c.getObject()) == null )
                        throw
                            new XmlRuntimeException(
                                "Path must select only elements " +
                                    "and attributes" );
                    }
View Full Code Here

    {
        XmlCursor cur = newCursor();
        if (cur == null)
            return false;

        boolean result = !cur.toParent();
        cur.dispose();
        return result;
    }

    /**
 
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.