com.greenbird.xml
Class XPathRoot

java.lang.Object
  extended by com.greenbird.xml.XPathRoot

public class XPathRoot
extends Object

Utility that simplifies the usage of the standard JDK XPath API by removing checked exceptions and adding generics.

Note that this utility is not optimized for performance and should not be used in non-performance critical scenarios.


Method Summary
static XPathRoot forNode(Node node)
           
static XPathRoot forResource(String xmlPath)
           
static XPathRoot forSource(InputSource xmlSource)
           
static XPathRoot forString(String xmlString)
           
 Node node(String xPath)
           
 Node node(String xPath, Object context)
           
 List<Node> nodes(String xPath)
           
 List<Node> nodes(String xPath, Object context)
           
 XPathRoot rootFrom(Node rootNode)
           
 XPathRoot rootFrom(String xPath)
           
 String value(String xPath)
           
 String value(String xPath, Object context)
           
 XPathRoot withNamespaceContext(NamespaceContext namespaceContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forNode

public static XPathRoot forNode(Node node)

forSource

public static XPathRoot forSource(InputSource xmlSource)

forString

public static XPathRoot forString(String xmlString)

forResource

public static XPathRoot forResource(String xmlPath)

withNamespaceContext

public XPathRoot withNamespaceContext(NamespaceContext namespaceContext)

nodes

public List<Node> nodes(String xPath)

nodes

public List<Node> nodes(String xPath,
                        Object context)

node

public Node node(String xPath)

node

public Node node(String xPath,
                 Object context)

value

public String value(String xPath)

value

public String value(String xPath,
                    Object context)

rootFrom

public XPathRoot rootFrom(String xPath)

rootFrom

public XPathRoot rootFrom(Node rootNode)


Copyright © 2013 greenbird Integration Technology. All Rights Reserved.