org.mmbase.util
Class XMLBasicReader

java.lang.Object
  extended byorg.mmbase.util.xml.DocumentReader
      extended byorg.mmbase.util.XMLBasicReader
Direct Known Subclasses:
BuilderReader, DatabaseReader, MagicXMLReader, XMLApplicationReader, XmlEtxIndicesReader, XMLMMLanguageReader, XMLModuleReader, XMLNodeReader, XMLRelationNodeReader, XMLScreenWriter

public class XMLBasicReader
extends DocumentReader

XMLBasicReader has two goals.

Version:
$Id: XMLBasicReader.java,v 1.39 2004/02/24 17:47:00 michiel Exp $
Author:
Case Roule, Rico Jansen, Pierre van Rooden, Michiel Meeuwissen

Field Summary
 
Fields inherited from class org.mmbase.util.xml.DocumentReader
document, DTD_ERROR, DTD_ERROR_1_0, FILENOTFOUND, PUBLIC_ID_ERROR, PUBLIC_ID_ERROR_1_0
 
Constructor Summary
XMLBasicReader(org.xml.sax.InputSource source)
           
XMLBasicReader(org.xml.sax.InputSource source, boolean validating)
           
XMLBasicReader(org.xml.sax.InputSource source, boolean validating, java.lang.Class resolveBase)
           
XMLBasicReader(org.xml.sax.InputSource source, java.lang.Class resolveBase)
           
XMLBasicReader(java.lang.String path)
           
XMLBasicReader(java.lang.String path, boolean validating)
           
XMLBasicReader(java.lang.String path, java.lang.Class resolveBase)
           
 
Method Summary
 java.util.Enumeration getChildElements(org.w3c.dom.Element e)
           
 java.util.Enumeration getChildElements(org.w3c.dom.Element e, java.lang.String tag)
           
 java.util.Enumeration getChildElements(java.lang.String path)
           
 java.util.Enumeration getChildElements(java.lang.String path, java.lang.String tag)
           
static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
          Deprecated. use {!link DocumentReader.getDocumentBuilder()}
static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean validating)
          Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean)}
static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean validating, org.xml.sax.EntityResolver resolver)
          Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean, ErrorHandler, EntityResolver)}
static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean validating, org.xml.sax.ErrorHandler handler)
          Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean, ErrorHandler, EntityResolver)}
static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean validating, org.xml.sax.ErrorHandler handler, org.xml.sax.EntityResolver resolver)
          Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean, ErrorHandler, EntityResolver)}
static javax.xml.parsers.DocumentBuilder getDocumentBuilder(java.lang.Class refer)
          Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean, ErrorHandler, EntityResolver)}
 java.lang.String getElementAttributeValue(org.w3c.dom.Element e, java.lang.String attr)
           
 java.lang.String getElementAttributeValue(java.lang.String path, java.lang.String attr)
           
 org.w3c.dom.Element getElementByPath(org.w3c.dom.Element e, java.lang.String path)
           
 org.w3c.dom.Element getElementByPath(java.lang.String path)
           
 java.lang.String getElementName(org.w3c.dom.Element e)
           
 java.lang.String getElementValue(org.w3c.dom.Element e)
           
 java.lang.String getElementValue(java.lang.String path)
           
 
Methods inherited from class org.mmbase.util.xml.DocumentReader
getFileName, getNodeTextValue, registerPublicIDs, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLBasicReader

public XMLBasicReader(java.lang.String path)

XMLBasicReader

public XMLBasicReader(java.lang.String path,
                      boolean validating)

XMLBasicReader

public XMLBasicReader(java.lang.String path,
                      java.lang.Class resolveBase)

XMLBasicReader

public XMLBasicReader(org.xml.sax.InputSource source)

XMLBasicReader

public XMLBasicReader(org.xml.sax.InputSource source,
                      boolean validating)

XMLBasicReader

public XMLBasicReader(org.xml.sax.InputSource source,
                      java.lang.Class resolveBase)

XMLBasicReader

public XMLBasicReader(org.xml.sax.InputSource source,
                      boolean validating,
                      java.lang.Class resolveBase)
Method Detail

getDocumentBuilder

public static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
Deprecated. use {!link DocumentReader.getDocumentBuilder()}

Obtain a DocumentBuilder


getDocumentBuilder

public static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean validating)
Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean)}

Obtain a DocumentBuilder


getDocumentBuilder

public static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean validating,
                                                                   org.xml.sax.ErrorHandler handler)
Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean, ErrorHandler, EntityResolver)}

Obtain a DocumentBuilder


getDocumentBuilder

public static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean validating,
                                                                   org.xml.sax.EntityResolver resolver)
Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean, ErrorHandler, EntityResolver)}

Obtain a DocumentBuilder


getDocumentBuilder

public static javax.xml.parsers.DocumentBuilder getDocumentBuilder(boolean validating,
                                                                   org.xml.sax.ErrorHandler handler,
                                                                   org.xml.sax.EntityResolver resolver)
Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean, ErrorHandler, EntityResolver)}

Obtain a DocumentBuilder


getDocumentBuilder

public static javax.xml.parsers.DocumentBuilder getDocumentBuilder(java.lang.Class refer)
Deprecated. use {!link DocumentReader.getDocumentBuilder(boolean, ErrorHandler, EntityResolver)}

Obtain a DocumentBuilder


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 element
attr - Attribute name
Returns:
Value of attribute

getElementAttributeValue

public java.lang.String getElementAttributeValue(org.w3c.dom.Element e,
                                                 java.lang.String attr)
Parameters:
e - Element
attr - 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 element
tag - 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 - Element
tag - tag to match ("*" means all tags")
Returns:
Enumeration of child elements with the given tag


MMBase build 1.7.1.20041002