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()

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

        try
        {
            c.selectPath( path, options );

            if (!c.hasNextSelection())
                selections = new XmlObject[ 0 ];
            else
            {
View Full Code Here

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

  public static Node selectFirstDomNode( XmlObject xmlObject, String xpath )
  {
    XmlCursor cursor = xmlObject.newCursor();
    try
    {
      cursor.selectPath( xpath );

      if( cursor.toNextSelection() )
      {
        return cursor.getDomNode();
      }
View Full Code Here

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

    List<Node> result = new ArrayList<Node>();

    XmlCursor cursor = xmlObject.newCursor();
    try
    {
      cursor.selectPath( xpath );

      while( cursor.toNextSelection() )
      {
        result.add( cursor.getDomNode() );
      }
View Full Code Here

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

    xpath = initXPathNamespaces( xpath );

    XmlCursor cursor = xmlObject.newCursor();
    try
    {
      cursor.selectPath( xpath );

      if( cursor.toNextSelection() )
      {
        XmlUtils.setNodeValue( cursor.getDomNode(), value == null ? null : value.toString() );
      }
View Full Code Here

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

      if( contentArea != null && contentArea.isVisible() )
        contentArea.setText( "" );

      cursor = xml.newCursor();
      cursor.selectPath( expandedPath );
      if( !cursor.toNextSelection() )
      {
        UISupport.showErrorMessage( "No match in current response" );
      }
      else if( cursor.hasNextSelection() )
View Full Code Here

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

    try
    {
      List<String> result = new ArrayList<String>();

      String tp = PropertyExpander.expandProperties( context, getTargetPath() );
      targetCursor.selectPath( tp );

      if( !targetCursor.toNextSelection() )
        throw new Exception( "Missing match for Target XPath [" + tp + "]" );

      String value = sourceProperty.getValue();
View Full Code Here

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

    protected void read(InputStream is) throws IOException, XmlException {
        XmlObject root = XmlObject.Factory.parse(is);

        _qnames = new ArrayList<QName>();
        _items = new ArrayList<XmlObject>();
        for(XmlObject obj : root.selectPath("$this/xml/*")) {
            Node nd = obj.getDomNode();
            QName qname = new QName(nd.getNamespaceURI(), nd.getLocalName());
            if (qname.equals(QNAME_SHAPE_LAYOUT)) {
                _items.add(CTShapeLayout.Factory.parse(obj.xmlText()));
            } else if (qname.equals(QNAME_SHAPE_TYPE)) {
View Full Code Here

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

    protected abstract String getRootElementName();

    protected CTGroupShape getSpTree(){
        if(_spTree == null) {
            XmlObject root = getXmlObject();
            XmlObject[] sp = root.selectPath(
                    "declare namespace p='http://schemas.openxmlformats.org/presentationml/2006/main' .//*/p:spTree");
            if(sp.length == 0) throw new IllegalStateException("CTGroupShape was not found");
            _spTree = (CTGroupShape)sp[0];
        }
        return _spTree;
View Full Code Here

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

         nsContextElem = ( (Document) propsDocXBean.newDomNode(  ) ).getDocumentElement(  );
      }

      try
      {
         return propsDocXBean.selectPath( xpathExpr.getValue(  ) );
      }
      catch ( RuntimeException re )
      {
         throw new QueryEvaluationErrorFaultException( MSG.getMessage( Keys.QUERY_FAILED, xpathExpr.getValue(  ),re.getLocalizedMessage(  ) ));
      }
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.