(incubating) | The Free and Open Productivity Suite
OOoRunner test harness

util
Class XMLTools.XMLChecker

util.XMLTools.XMLWriter
  |
  +--util.XMLTools.XMLWellFormChecker
        |
        +--util.XMLTools.XMLChecker
Enclosing class:
XMLTools

public static class XMLTools.XMLChecker
extends XMLTools.XMLWellFormChecker

Class realises extended XML data checking. It has possibilities to check if a tag exists, if it has some attributes with values, and if this tag is contained in another tag (which also can specify any attributes). It can check if some character data exists inside any tag specified.


Field Summary
protected  Vector attrStack
           
protected  Vector chars
           
protected  Vector tags
           
protected  HashSet tagSet
           
protected  Vector tagStack
           
 
Fields inherited from class util.XMLTools.XMLWellFormChecker
docEnded, docStarted, log, noOtherErrors, printXMLData, wellFormed
 
Constructor Summary
XMLTools.XMLChecker(PrintWriter log, boolean writeXML)
           
 
Method Summary
 void addCharacters(String ch)
           
 void addCharactersEnclosed(String ch, XMLTools.Tag outerTag)
           
 void addTag(XMLTools.Tag tag)
           
 void addTagEnclosed(XMLTools.Tag tag, XMLTools.Tag outerTag)
           
 void characters(String ch)
           
 boolean check()
           
 void endElement(String name)
           
 void startElement(String name, com.sun.star.xml.sax.XAttributeList attr)
           
 
Methods inherited from class util.XMLTools.XMLWellFormChecker
endDocument, isWellFormed, printError, reset, startDocument
 
Methods inherited from class util.XMLTools.XMLWriter
ignorableWhitespace, processingInstruction, setDocumentLocator
 

Field Detail

tagSet

protected HashSet tagSet

tags

protected Vector tags

chars

protected Vector chars

tagStack

protected Vector tagStack

attrStack

protected Vector attrStack
Constructor Detail

XMLTools.XMLChecker

public XMLTools.XMLChecker(PrintWriter log,
                           boolean writeXML)
Method Detail

addTag

public void addTag(XMLTools.Tag tag)

addTagEnclosed

public void addTagEnclosed(XMLTools.Tag tag,
                           XMLTools.Tag outerTag)

addCharacters

public void addCharacters(String ch)

addCharactersEnclosed

public void addCharactersEnclosed(String ch,
                                  XMLTools.Tag outerTag)

startElement

public void startElement(String name,
                         com.sun.star.xml.sax.XAttributeList attr)
Overrides:
startElement in class XMLTools.XMLWellFormChecker

characters

public void characters(String ch)
Overrides:
characters in class XMLTools.XMLWriter

endElement

public void endElement(String name)
Overrides:
endElement in class XMLTools.XMLWellFormChecker

check

public boolean check()

OOoRunner test harness

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.