org.mmbase.util
Class XMLBasicReader
java.lang.Object
|
+--org.mmbase.util.XMLBasicReader
- Direct Known Subclasses:
- MagicFile.MagicXMLReader, XMLApplicationReader, XMLBuilderReader, XMLDatabaseReader, XMLMMLanguageReader, XMLModuleReader, XMLScreenWriter
- public class XMLBasicReader
- extends java.lang.Object
- Version:
- $Id: XMLBasicReader.java,v 1.14 2002/02/05 14:35:31 eduard Exp $
- Author:
- Case Roule, Rico Jansen, Pierre van Rooden
|
Field Summary |
protected org.w3c.dom.Document |
document
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
document
protected org.w3c.dom.Document document
XMLBasicReader
public XMLBasicReader(java.lang.String path)
getDocumentBuilder
public static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
getElementByPath
public org.w3c.dom.Element getElementByPath(java.lang.String path)
- Parameters:
path - Dot-separated list of tags describing path from root element to requested element.
NB the path starts with the name of the root element.- Returns:
- Leaf element of the path
getElementByPath
public org.w3c.dom.Element getElementByPath(org.w3c.dom.Element e,
java.lang.String path)
- Parameters:
e - Element from which the "relative" path is starting.
NB the path starts with the name of the root element.path - Dot-separated list of tags describing path from root element to requested element- Returns:
- Leaf element of the path
getElementValue
public java.lang.String getElementValue(java.lang.String path)
- Parameters:
path - Path to the element- Returns:
- Text value of element
getElementValue
public java.lang.String getElementValue(org.w3c.dom.Element e)
- Parameters:
e - Element- Returns:
- Text value of element
getElementName
public java.lang.String getElementName(org.w3c.dom.Element e)
- Parameters:
e - Element- Returns:
- Tag name of the element
getElementAttributeValue
public java.lang.String getElementAttributeValue(java.lang.String path,
java.lang.String attr)
- Parameters:
path - Path to the elementattr - Attribute name- Returns:
- Value of attribute
getElementAttributeValue
public java.lang.String getElementAttributeValue(org.w3c.dom.Element e,
java.lang.String attr)
- Parameters:
e - Elementattr - Attribute name- Returns:
- Value of attribute
getChildElements
public java.util.Enumeration getChildElements(java.lang.String path)
- Parameters:
path - Path to the element- Returns:
- Enumeration of child elements
getChildElements
public java.util.Enumeration getChildElements(org.w3c.dom.Element e)
- Parameters:
e - Element- Returns:
- Enumeration of child elements
getChildElements
public java.util.Enumeration getChildElements(java.lang.String path,
java.lang.String tag)
- Parameters:
path - Path to the elementtag - tag to match ("*" means all tags")- Returns:
- Enumeration of child elements with the given tag
getChildElements
public java.util.Enumeration getChildElements(org.w3c.dom.Element e,
java.lang.String tag)
- Parameters:
e - Elementtag - tag to match ("*" means all tags")- Returns:
- Enumeration of child elements with the given tag
getFileName
public java.lang.String getFileName()
MMBase 2002