Package org.dom4j

Examples of org.dom4j.Node.selectNodes()


            if ( includeAllFiles ) {
              fileNodes = node.selectNodes( "./file[@isDirectory='false']" );

            } else {
              fileNodes =
                  node.selectNodes( "./file[@isDirectory='false'][ends-with(string(@name),'.xcdf') or ends-with(string(@name),'.wcdf')]" );
            }

            for ( final Node fileNode : fileNodes ) {

              processFileNode( json, fileNode, "files" );
View Full Code Here


      final Document navDoc = getRepositoryDocument( this.userSession );
      final Node tree = navDoc.getRootElement();
      final String xPathDir = "./file[@name='" + _solution + "']"; //$NON-NLS-1$

      List nodes = tree.selectNodes( xPathDir ); //$NON-NLS-1$
      if ( !nodes.isEmpty() && nodes.size() == 1 ) {

        // Add Folder
        final Node node = getDirectoryNode( (Node) nodes.get( 0 ), _path );
        json.put( "name", node.valueOf( "@name" ) );
View Full Code Here

        json.put( "title", "Hidden" );

        array = new JSONArray();
        json.put( "content", array );

        nodes = node.selectNodes( "./file" );

        // Add Folder Content

        for ( final Object fileNode : nodes ) {
          processFileNode( json, (Node) fileNode, "content" );
View Full Code Here

            //Process directory wcdf/xcdf files
            List<Node> fileNodes;
            if (includeAllFiles)
            {
              fileNodes = node.selectNodes("./file[@isDirectory='false']");

            }
            else
            {
              fileNodes = node.selectNodes("./file[@isDirectory='false'][ends-with(string(@name),'.xcdf') or ends-with(string(@name),'.wcdf')]");
View Full Code Here

              fileNodes = node.selectNodes("./file[@isDirectory='false']");

            }
            else
            {
              fileNodes = node.selectNodes("./file[@isDirectory='false'][ends-with(string(@name),'.xcdf') or ends-with(string(@name),'.wcdf')]");
            }


            for (final Node fileNode : fileNodes)
            {
View Full Code Here

      final Document navDoc = getRepositoryDocument(this.userSession);
      final Node tree = navDoc.getRootElement();
      final String xPathDir = "./file[@name='" + _solution + "']"; //$NON-NLS-1$

      List nodes = tree.selectNodes(xPathDir); //$NON-NLS-1$
      if (!nodes.isEmpty() && nodes.size() == 1)
      {

      
View Full Code Here

        json.put("title", "Hidden");

        array = new JSONArray();
        json.put("content",array);

        nodes = node.selectNodes("./file");

        //Add Folder Content

        for (final Object fileNode : nodes)
        {
View Full Code Here

    private List<ExecutionDetail> parseExecutionsResult(final WebserviceResponse response) {
        final Document resultDoc = response.getResultDoc();

        final Node node = resultDoc.selectSingleNode("/result/executions");
        final List items = node.selectNodes("execution");
        final ArrayList<ExecutionDetail> list = new ArrayList<ExecutionDetail>();
        if (null != items && items.size() > 0) {
            for (final Object o : items) {
                final Node node1 = (Node) o;
                ExecutionDetailImpl detail = new ExecutionDetailImpl();
View Full Code Here

    }
    private ArrayList<QueuedItem> parseExecutionListResult(final WebserviceResponse response) {
        final Document resultDoc = response.getResultDoc();

        final Node node = resultDoc.selectSingleNode("/result/executions");
        final List items = node.selectNodes("execution");
        final ArrayList<QueuedItem> list = new ArrayList<QueuedItem>();
        if (null != items && items.size() > 0) {
            for (final Object o : items) {
                final Node node1 = (Node) o;
                final String id = node1.selectSingleNode("@id").getStringValue();
View Full Code Here

                //end
                receiverfinished = true;
                break;
            }

            final List list = result1.selectNodes("entries/entry");
            for (final Object obj : list) {
                Node node = (Node) obj;
                final String timeStr = stringNodeValue(node, "@time", null);
                final String levelStr = stringNodeValue(node, "@level", null);
                final String user = stringNodeValue(node, "@user", null);
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.