com.ochafik.xml
Class XMLUtils

java.lang.Object
  extended by com.ochafik.xml.XMLUtils

public class XMLUtils
extends Object


Constructor Summary
XMLUtils()
           
 
Method Summary
static String escapeEntities(String s)
           
static StringBuffer gatherTextPCDATAAndCDATADescendants(Node node, StringBuffer sb, String separator)
           
static String getAttribute(Node node, String name)
           
static List<Node> getAttributes(Node node)
           
static List<Node> getByName(Node node, String name)
           
static List<Node> getChildElements(Node node)
           
static Collection<Node> getChildrenByName(Node node, String name)
           
static Node getFirstNamedNode(Node node, String name)
           
static List<Node> list(NodeList nodeList)
           
static String nodeToString(Node node)
           
static Document readXML(File file)
           
static String stripTags(String xmlString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtils

public XMLUtils()
Method Detail

getAttribute

public static String getAttribute(Node node,
                                  String name)

getFirstNamedNode

public static Node getFirstNamedNode(Node node,
                                     String name)

getByName

public static List<Node> getByName(Node node,
                                   String name)

getChildrenByName

public static Collection<Node> getChildrenByName(Node node,
                                                 String name)

getChildElements

public static List<Node> getChildElements(Node node)

getAttributes

public static List<Node> getAttributes(Node node)

gatherTextPCDATAAndCDATADescendants

public static StringBuffer gatherTextPCDATAAndCDATADescendants(Node node,
                                                               StringBuffer sb,
                                                               String separator)

nodeToString

public static String nodeToString(Node node)

escapeEntities

public static final String escapeEntities(String s)

stripTags

public static String stripTags(String xmlString)

readXML

public static Document readXML(File file)
                        throws Exception
Throws:
Exception

list

public static List<Node> list(NodeList nodeList)


Copyright © 2009. All Rights Reserved.