Class DomReader
- java.lang.Object
-
- edu.stanford.nlp.ie.machinereading.common.DomReader
-
- Direct Known Subclasses:
AceDomReader,AceSentenceSegmenter
public class DomReader extends Object
Generic DOM reader for an XML file
-
-
Constructor Summary
Constructors Constructor Description DomReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetAttributeValue(Node node, String attributeName)Fetches the value of a given attributeprotected static NodegetChildByAttribute(Node node, String attributeName, String attributeValue)Searches for children that have the given attributeprotected static NodegetChildByName(Node node, String name)Searches (recursively) for the first child that has the given nameprotected static NodegetChildByNameAndAttribute(Node node, String name, String attributeName, String attributeValue)Searches for children that have the given name and attributeprotected static List<Node>getChildrenByName(Node node, String name)Searches for all immediate children with the given namestatic DocumentreadDocument(File f)Constructs one Document from an XML file
-
-
-
Method Detail
-
getChildByName
protected static Node getChildByName(Node node, String name)
Searches (recursively) for the first child that has the given name
-
getChildrenByName
protected static List<Node> getChildrenByName(Node node, String name)
Searches for all immediate children with the given name
-
getChildByAttribute
protected static Node getChildByAttribute(Node node, String attributeName, String attributeValue)
Searches for children that have the given attribute
-
getChildByNameAndAttribute
protected static Node getChildByNameAndAttribute(Node node, String name, String attributeName, String attributeValue)
Searches for children that have the given name and attribute
-
getAttributeValue
public static String getAttributeValue(Node node, String attributeName)
Fetches the value of a given attribute
-
readDocument
public static Document readDocument(File f) throws IOException, SAXException, ParserConfigurationException
Constructs one Document from an XML file
-
-