|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.linguistics.kif.BasicXMLparser
public class BasicXMLparser
Parses simple XML into a hierarchy of BasicXMLelement (s). Used instead of SAX because that class is so complex. The right thing to do is probably to subclass SAX or create some simpler utility class that makes using it easier. This class assumes that each XML tag is on its own line and that every attribute value is enclosed in single or double quotes.
| Field Summary | |
|---|---|
java.util.ArrayList |
elements
An ArrayList of BasicXMLelement(s). |
| Constructor Summary | |
|---|---|
BasicXMLparser(java.lang.String xml)
************************************************************** Constructor that parses an XML-formatted string, with one tag per line, into an ArrayList of BasicXMLelement (s). |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Test method. |
java.lang.String |
toString()
Convert the XML hierarchy to a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.util.ArrayList elements
| Constructor Detail |
|---|
public BasicXMLparser(java.lang.String xml)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
args - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||