NetKernel APIs


org.ten60.netkernel.xml.xda
Interface IXDAReadOnly

All Known Subinterfaces:
IXDA, IXDAIterator, IXDAReadOnlyIterator
All Known Implementing Classes:
DOMXDA

public interface IXDAReadOnly


Method Summary
 IXPathResult eval(String aTargetXPath)
          Evaluate the xpath against the document returning an IXPathResult
 String getText(String aTargetXPath, boolean aTrim)
          Return the text that is contained at the element located using an XPath
 boolean isTrue(String aTargetXPath)
          Evaluate and xpath against the document returning a boolean result
 IXDAReadOnlyIterator readOnlyIterator(String aTargetXPath)
          Return an iterator over all elements that match the an XPath
 void serialize(Writer aWriter, boolean indent)
          Serialize the whole document
 void serialize(Writer aWriter, String aTargetXPath, boolean indent)
          Serialize part of the document
 

Method Detail

eval

public IXPathResult eval(String aTargetXPath)
                  throws XPathLocationException
Evaluate the xpath against the document returning an IXPathResult

Throws:
XPathLocationException - throw if the xpath is malformed

isTrue

public boolean isTrue(String aTargetXPath)
               throws XPathLocationException
Evaluate and xpath against the document returning a boolean result

Throws:
XPathLocationException - throw if the xpath is malformed

getText

public String getText(String aTargetXPath,
                      boolean aTrim)
               throws XPathLocationException
Return the text that is contained at the element located using an XPath

Parameters:
aTargetXPath - the xpath
aTrim - if true trim whitespace from the String
Returns:
the string
Throws:
XPathLocationException - throw if the xpath is malformed or doesn't point to a single unique element

readOnlyIterator

public IXDAReadOnlyIterator readOnlyIterator(String aTargetXPath)
                                      throws XPathLocationException
Return an iterator over all elements that match the an XPath

Parameters:
aTargetXPath - the xpath
Returns:
the iterator
Throws:
XPathLocationException - throw if the xpath is malformed

serialize

public void serialize(Writer aWriter,
                      String aTargetXPath,
                      boolean indent)
               throws XPathLocationException,
                      IOException
Serialize part of the document

Parameters:
aWriter - the writer to write the serialized document to
aTargetXPath - the xpath
indent - true if the document should be re-indented
Throws:
XPathLocationException - throw if the xpath is malformed or doesn't point to a single unique element
IOException - throw if the writer cannot be written to

serialize

public void serialize(Writer aWriter,
                      boolean indent)
               throws IOException
Serialize the whole document

Parameters:
aWriter - the writer to write the serialized document to
indent - true if the document should be re-indented
Throws:
IOException - throw if the writer cannot be written to

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.