Examples of toNextSelection()


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

          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")) {
                      // Type is "Embed"
View Full Code Here

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

            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());
                    }
                    if (o instanceof CTPTab) {
View Full Code Here

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

                selections = EMPTY_RESULT;
            else
            {
                selections = new XmlObject [ c.getSelectionCount() ];

                for (int i = 0 ; c.toNextSelection() ; i++)
                {
                    if ((selections[ i ] = c.getObject()) == null)
                    {
                        if ( !c.toParent() || (selections[ i ] = c.getObject()) == null )
                        throw
View Full Code Here

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

      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();
      cursor.selectPath("//SCRIPT[@type = 'text/turtle']");
      while(cursor.hasNextSelection()) {
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.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();
        } catch (SAXException e) {
      logger.error(e);
View Full Code Here

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

        // 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)
                //  come up as instances of CTText, but we don't want them
View Full Code Here

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

        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) {
                cells.add(new XWPFSDTCell((CTSdtCell)o, this, table.getBody()));
View Full Code Here

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

        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);
                bodyElements.add(p);
View Full Code Here

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

            // 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);
                    paragraphs.add(p);
View Full Code Here

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

       // 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("./*");
                while (c2.toNextSelection()) {
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.