Package com.dotcms.repackage.org.w3c.dom

Examples of com.dotcms.repackage.org.w3c.dom.Node


      is = new ByteArrayInputStream(s.getBytes());
      Document doc = builder.parse(is);

      NodeList nl = doc.getElementsByTagName("img");
      for (int i = 0; i < nl.getLength(); i++) {
        Node n = nl.item(i);
        Node srcNode = n.getAttributes().getNamedItem("src");
        String srcText = srcNode.getNodeValue();
        String newText = getRealPath(srcText, host, url);
        String cleanText = cleanPath(newText);
        srcNode.setNodeValue(cleanText);
      }

      renderer.setDocument(doc, null);
      // renderer.setDocument("http://www.w3.org/");
      renderer.layout();
View Full Code Here


    private String extractData (NodeList nodeList) {
      String ret="";
      if (nodeList.getLength() > 0) {
        Element title = (Element) nodeList.item(0);
        NodeList children = title.getChildNodes();
        Node item=children.item(0);
        if (item!=null) {
            ret = item.getNodeValue();
        }
        if(!UtilMethods.isSet(ret) && UtilMethods.isSet(children.item(1))){
            ret = children.item(1).getNodeValue();
        }
      }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.w3c.dom.Node

Copyright © 2018 www.massapicom. 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.