org.jboss.jsfunit.analysis.util
Class ParserUtils
java.lang.Object
org.jboss.jsfunit.analysis.util.ParserUtils
public class ParserUtils
- extends Object
- Since:
- 1.0
- Author:
- Dennis Byrne
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParserUtils
public ParserUtils()
getDocumentBuilder
public static DocumentBuilder getDocumentBuilder()
getXml
public static String getXml(String resourcePath,
StreamProvider streamProvider)
getDocument
public static Document getDocument(String xml)
throws SAXException,
IOException
- Throws:
SAXException
IOException
query
public static NodeList query(Node node,
String xpathQuery,
String filePath)
querySingle
public static String querySingle(Node node,
String xpathQuery,
String filePath)
getDomDocument
public static Document getDomDocument(String filePath,
StreamProvider streamProvider)
- Setup the DOM parser for the file specified.
- Parameters:
filePath
- the path to the file to be parsedstreamProvider
- the StreamProvider
- Returns:
- a DOM Document
getDomDocument
public static Document getDomDocument(InputStream file,
String filePath)
- Setup the DOM parser for the file specified.
- Parameters:
file
- the input stream to be parsedfilePath
- the path to the file to be parsed
- Returns:
- a DOM Document
Copyright © 2007-2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.