Package org.dom4j

Examples of org.dom4j.Node.asXML()


                    node = (Node) node.clone();
                    parts.add(DocumentHelper.createDocument((Element) node));
                }
                else
                {
                    logger.warn("Dcoument node: " + node.asXML()
                            + " is not an element and thus is not a valid part");
                }
            }
            return parts;
        }
View Full Code Here


                Iterator nodes = element.content().iterator();
                Node node;
                StringBuffer output = new StringBuffer();
                while (nodes.hasNext()) {
                    node = (Node) nodes.next();
                    output.append(node.asXML());
                }
                return (trim ? output.toString().trim() : output.toString());
            }
            else {
                return (trim ? element.getStringValue().trim() : element.getStringValue());
View Full Code Here

            final Document document = new SAXReader().read(is);
            final String xpathBase = "/" + ListJACCPoliciesServlet.ROOT_ELEMENT
                    + "/ActiveContextPolicies/ContextPolicy[@contextID='" + contextId + "']";
            final Node contextPolicyNode = document.selectSingleNode(xpathBase);
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug(contextPolicyNode.asXML());
            }
            return contextPolicyNode;
        } finally {
            is.close();
        }
View Full Code Here

          } else if ( resourceType == IActionSequenceResource.XML ) {
            //resourceLocation = XmlHelper.getNodeText("xml", resourceNode); //$NON-NLS-1$
            Node xmlNode = typeNode.selectSingleNode( "./location/*" ); //$NON-NLS-1$
            // Danger, we have now lost the character encoding of the XML in this node
            // see BISERVER-895
            resourceLocation = ( xmlNode == null ) ? "" : xmlNode.asXML(); //$NON-NLS-1$
          }
          mimeNode = typeNode.selectSingleNode( "mime-type" ); //$NON-NLS-1$
          if ( mimeNode != null ) {
            resourceMimeType = mimeNode.getText();
            if ( ( resourceType == IActionSequenceResource.SOLUTION_FILE_RESOURCE )
View Full Code Here

        return null;
      }
      Document document = DocumentHelper.parseText( xFormHtml );
      Node xFormHtmlNode = document.selectSingleNode( "//xForm" ); //$NON-NLS-1$

      setXslProperty( "xForm", xFormHtmlNode.asXML() ); //$NON-NLS-1$

      if ( ( stylesheetName != null ) && !"".equals( stylesheetName ) ) { //$NON-NLS-1$
        setXslProperty( "css", stylesheetName ); //$NON-NLS-1$
      }
      setXsl( "text/html", templateName ); //$NON-NLS-1$
View Full Code Here

            actionParameter.getValue().getClass().toString() + "=" + actionParameter.getValue().toString() ) ); //$NON-NLS-1$ //$NON-NLS-2$
    }

    String test = XmlDom4JHelper.getNodeText( "test", componentNode ); //$NON-NLS-1$
    if ( ( test == null ) || ( test.length() < 1 ) ) {
      message( componentNode.asXML() );
      return ( true );
    }

    String newName = XmlDom4JHelper.getNodeText( "newname", componentNode ); //$NON-NLS-1$
    Object theResult = null;
View Full Code Here

            {
                Object object = resultIter.next();
                if ( object instanceof Node )
                {
                    Node node = (Node) object;
                    System.out.println( node.asXML() );
                }
                else
                {
                    System.out.println( object );
                }
View Full Code Here

            {
                Object object = resultIter.next();
                if ( object instanceof Node )
                {
                    Node node = (Node) object;
                    System.out.println( node.asXML() );
                }
                else
                {
                    System.out.println( object );
                }
View Full Code Here

        for (Iterator iter = list.iterator(); iter.hasNext();) {
            Node node = (Node) iter.next();

            if (nodeFilter.matches(node)) {
                log("Matches node: " + node.asXML());
            } else {
                log("No match for node: " + node.asXML());
            }
        }
    }
View Full Code Here

            Node node = (Node) iter.next();

            if (nodeFilter.matches(node)) {
                log("Matches node: " + node.asXML());
            } else {
                log("No match for node: " + node.asXML());
            }
        }
    }
}
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.