Examples of selectPath()


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

          c.selectPath("./*");
          while (c.toNextSelection()) {
             XmlObject o = c.getObject();
             if (o instanceof CTObject) {
                XmlCursor c2 = o.newCursor();
                c2.selectPath("./*");
                while (c2.toNextSelection()) {
                   XmlObject o2 = c2.getObject();

                   XmlObject embedAtt = o2.selectAttribute(new QName("Type"));
                   if (embedAtt != null && embedAtt.getDomNode().getNodeValue().equals("Embed")) {
View Full Code Here

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

            // Get text of the paragraph
            for (int j = 0; j < rs.size(); j++) {
                // Grab the text and tabs of the paragraph
                // Do so in a way that preserves the ordering
                XmlCursor c = rs.get(j).newCursor();
                c.selectPath("./*");
                while (c.toNextSelection()) {
                    XmlObject o = c.getObject();
                    if (o instanceof CTText) {
                        text.append(((CTText) o).getStringValue());
                    }
View Full Code Here

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

        if (c == null)
            throw new XmlValueDisconnectedException();

        try
        {
            c.selectPath( path, options );

            if (!c.hasNextSelection())
                selections = EMPTY_RESULT;
            else
            {
View Full Code Here

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

    try {
      parser.parse(new InputSource(html));
      XmlObject xmlBean = XmlObject.Factory.parse(parser.getDocument().getDocumentElement());
      XmlCursor cursor = xmlBean.newCursor();
      cursor.toFirstContentToken();
      cursor.selectPath("//SCRIPT[@type = 'application/rdf+n3']");
      while(cursor.hasNextSelection()) {
        cursor.toNextSelection();
        model.read(new StringReader(cursor.getTextValue()), "", "N3");
      }
      cursor.toFirstContentToken();
View Full Code Here

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

      while(cursor.hasNextSelection()) {
        cursor.toNextSelection();
        model.read(new StringReader(cursor.getTextValue()), "", "N3");
      }
      cursor.toFirstContentToken();
      cursor.selectPath("//SCRIPT[@type = 'text/turtle']");
      while(cursor.hasNextSelection()) {
        cursor.toNextSelection();
        model.read(new StringReader(cursor.getTextValue()), "", "TTL");
      }
      cursor.dispose();
View Full Code Here

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

        StringBuffer text = new StringBuffer();

        // Grab the text and tabs of the text run
        // Do so in a way that preserves the ordering
        XmlCursor c = run.newCursor();
        c.selectPath("./*");
        while (c.toNextSelection()) {
            XmlObject o = c.getObject();
            if (o instanceof CTText) {
                String tagName = o.getDomNode().getNodeName();
                // Field Codes (w:instrText, defined in spec sec. 17.16.23)
View Full Code Here

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

   
        List<ICell> cells = new ArrayList<ICell>();
        //Can't use ctRow.getTcList because that only gets table cells
        //Can't use ctRow.getSdtList because that only gets sdts that are at cell level
        XmlCursor cursor = ctRow.newCursor();
        cursor.selectPath("./*");
        while (cursor.toNextSelection()) {
            XmlObject o = cursor.getObject();
            if (o instanceof CTTc){
                cells.add(new XWPFTableCell((CTTc)o, this, table.getBody()));
            } else if (o instanceof CTSdtCell) {
View Full Code Here

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

        bodyElements = new ArrayList<IBodyElement>();
        paragraphs = new ArrayList<XWPFParagraph>();
        tables = new ArrayList<XWPFTable>();

        XmlCursor cursor = ctTc.newCursor();
        cursor.selectPath("./*");
        while (cursor.toNextSelection()) {
            XmlObject o = cursor.getObject();
            if (o instanceof CTP) {
                XWPFParagraph p = new XWPFParagraph((CTP)o, this);
                paragraphs.add(p);
View Full Code Here

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

            initFootnotes();

            // parse the document with cursor and add
            // the XmlObject to its lists
            XmlCursor cursor = ctDocument.getBody().newCursor();
            cursor.selectPath("./*");
            while (cursor.toNextSelection()) {
                XmlObject o = cursor.getObject();
                if (o instanceof CTP) {
                    XWPFParagraph p = new XWPFParagraph((CTP) o, this);
                    bodyElements.add(p);
View Full Code Here

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

       // Output placeholder for any embedded docs:

       // TODO: replace w/ XPath/XQuery:
       for(XWPFRun run : paragraph.getRuns()) {
          XmlCursor c = run.getCTR().newCursor();
          c.selectPath("./*");
          while (c.toNextSelection()) {
             XmlObject o = c.getObject();
             if (o instanceof CTObject) {
                XmlCursor c2 = o.newCursor();
                c2.selectPath("./*");
 
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.