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 StringBuilder
The buffer containing the text node being readprivate final XMLPropertyListConfiguration.PListNodeBuilder
The builder for the resulting node.private final List
<XMLPropertyListConfiguration.PListNodeBuilder> The stack of configuration nodes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
endElement
(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 void
Put a node on the top of the stack.void
startElement
(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
-
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:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-