Class XMLPropertyListConfiguration.XMLPropertyListHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.commons.configuration2.plist.XMLPropertyListConfiguration.XMLPropertyListHandler
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
- Enclosing class:
XMLPropertyListConfiguration
SAX Handler to build the configuration nodes while the document is being parsed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringBuilderThe buffer containing the text node being readprivate final XMLPropertyListConfiguration.PListNodeBuilderThe builder for the resulting node.private final List<XMLPropertyListConfiguration.PListNodeBuilder> The stack of configuration nodes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidendElement(String uri, String localName, String qName) Gets the builder for the result node.peek()Return the node on the top of the stack.peekNE()Returns the node on top of the non-empty stack.pop()Remove and return the node on the top of the stack.private voidPut a node on the top of the stack.voidstartElement(String uri, String localName, String qName, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
Field Details
-
buffer
The buffer containing the text node being read -
stack
The stack of configuration nodes -
resultBuilder
The builder for the resulting node.
-
-
Constructor Details
-
XMLPropertyListHandler
public XMLPropertyListHandler()
-
-
Method Details
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
getResultBuilder
Gets the builder for the result node.- Returns:
- the result node builder
-
peek
Return the node on the top of the stack. -
peekNE
Returns the node on top of the non-empty stack. Throws an exception if the stack is empty.- Returns:
- the top node of the stack
- Throws:
ConfigurationRuntimeException- if the stack is empty
-
pop
Remove and return the node on the top of the stack. -
push
Put a node on the top of the stack. -
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-