xml
Class XMLElementSeqExtractor

java.lang.Object
  extended by xml.XMLElementSeqExtractor

public class XMLElementSeqExtractor
extends java.lang.Object

2007-03: NOW OBSOLETE

Given an XML document text, and an element name or set of element names, an instance of this class extracts all occurrences of the named element(s).

NB
It is assumed that there are no nested occurrences of the given element, either because such nesting is not valid for the given document type, or because it is known not to occur in the particular document supplied. It is also assumed that there are no occurrences of the element embedded in comments.


Constructor Summary
XMLElementSeqExtractor(java.lang.String xmldoc, java.lang.String[] elnames, boolean validate, CleanerEntityResolver rslvr)
          Constructs a new extractor for the given XML document text and given set of element names, using a validating or non-validating XML parser as specified, and using the given entity resolver.
XMLElementSeqExtractor(java.lang.String xmldoc, java.lang.String[] elnames, CleanerEntityResolver rslvr)
          Constructs a new extractor for the given XML document text and given set of element names, using a validating XML parser and the given entity resolver.
XMLElementSeqExtractor(java.lang.String xmldoc, java.lang.String elnm, boolean validate, CleanerEntityResolver rslvr)
          Constructs a new extractor for the given XML document text and the single given element name, using a validating or non-validating XML parser as specified, and using the given entity resolver.
XMLElementSeqExtractor(java.lang.String xmldoc, java.lang.String elnm, CleanerEntityResolver rslvr)
          Constructs a new extractor for the given XML document text and the single given element name, using a validating XML parser and the given entity resolver.
 
Method Summary
 java.lang.String[][] getElementSequence()
          Returns the extracted element sequence as an array in which each item is itself an array of strings, one for each line or line part occurring in that particular element text.
 java.lang.String[] getElementStringSequence()
          Returns the extracted element sequence as an array of strings, one per element text.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLElementSeqExtractor

public XMLElementSeqExtractor(java.lang.String xmldoc,
                              java.lang.String elnm,
                              CleanerEntityResolver rslvr)
Constructs a new extractor for the given XML document text and the single given element name, using a validating XML parser and the given entity resolver.


XMLElementSeqExtractor

public XMLElementSeqExtractor(java.lang.String xmldoc,
                              java.lang.String elnm,
                              boolean validate,
                              CleanerEntityResolver rslvr)
Constructs a new extractor for the given XML document text and the single given element name, using a validating or non-validating XML parser as specified, and using the given entity resolver.


XMLElementSeqExtractor

public XMLElementSeqExtractor(java.lang.String xmldoc,
                              java.lang.String[] elnames,
                              CleanerEntityResolver rslvr)
Constructs a new extractor for the given XML document text and given set of element names, using a validating XML parser and the given entity resolver.


XMLElementSeqExtractor

public XMLElementSeqExtractor(java.lang.String xmldoc,
                              java.lang.String[] elnames,
                              boolean validate,
                              CleanerEntityResolver rslvr)
Constructs a new extractor for the given XML document text and given set of element names, using a validating or non-validating XML parser as specified, and using the given entity resolver.

Method Detail

getElementSequence

public java.lang.String[][] getElementSequence()
Returns the extracted element sequence as an array in which each item is itself an array of strings, one for each line or line part occurring in that particular element text.


getElementStringSequence

public java.lang.String[] getElementStringSequence()
Returns the extracted element sequence as an array of strings, one per element text.