org.devyant.decorutils.xml
Class SimpleXmlWrapper

java.lang.Object
  extended by org.devyant.decorutils.xml.SimpleXmlWrapper

public class SimpleXmlWrapper
extends java.lang.Object

A simple wrapper for XML documents. Each DynaNode has a set of attributes which include text data retrieved from child nodes body.

Since:
31/Jan/2005 14:22:19
Version:
$Revision 1.0$ ($Author: ftavares$)
Author:
Filipe Tavares

Constructor Summary
SimpleXmlWrapper(java.lang.String file)
          Creates a new SimpleXmlWrapper instance.
 
Method Summary
 java.util.Collection getNodes()
          Returns a Collection of all the nodes in the document.
 java.util.Collection getNodes(java.lang.String xpath)
          Returns a Collection of the nodes selected by the XPath query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleXmlWrapper

public SimpleXmlWrapper(java.lang.String file)
                 throws javax.xml.parsers.ParserConfigurationException,
                        java.io.IOException,
                        org.xml.sax.SAXException
Creates a new SimpleXmlWrapper instance.

Parameters:
file - The XML file
Throws:
javax.xml.parsers.ParserConfigurationException - Thrown by document factory
java.io.IOException - Thrown by XML parser
org.xml.sax.SAXException - Thrown by XML parser
Method Detail

getNodes

public final java.util.Collection getNodes(java.lang.String xpath)
                                    throws javax.xml.transform.TransformerException
Returns a Collection of the nodes selected by the XPath query.

Parameters:
xpath - XPath query
Returns:
Collection of DynaNode's
Throws:
javax.xml.transform.TransformerException - Thrown by the XPath API

getNodes

public final java.util.Collection getNodes()
                                    throws javax.xml.transform.TransformerException
Returns a Collection of all the nodes in the document.

Returns:
Collection of DynaNode's
Throws:
javax.xml.transform.TransformerException - Thrown by the XPath API


Copyright © 2005 devyant. All Rights Reserved.