Package org.apache.xmlbeans

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


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

        try
        {
            c.selectPath( path, options );

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

  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

    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

    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

      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

    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

        {
          XmlCursor cursor = cursorCache.get( path );
          if( cursor == null && !cursorCache.containsKey( path ) )
          {
            cursor = xmlObject.newCursor();
            cursor.selectPath( path );
            if( !cursor.toNextSelection() )
            {
              cursor.dispose();
              cursor = null;
            }
View Full Code Here

      try
      {
        // XmlObject xmlObject = XmlObject.Factory.parse( content );
        XmlObject xmlObject = XmlUtils.createXmlObject( content );
        cursor = xmlObject.newCursor();
        cursor.selectPath( selectedQuery.getQuery() );
        if( !cursor.toNextSelection() )
        {
          UISupport.showErrorMessage( "Missing match in request" );
        }
        else
View Full Code Here

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

        try
        {
            c.selectPath( path, options );

            if (!c.hasNextSelection())
                selections = new XmlObject[ 0 ];
            else
            {
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.