Package org.exolab.castor.xml.parsing
Class AnyNodeUnmarshalHandler
java.lang.Object
org.exolab.castor.xml.parsing.AnyNodeUnmarshalHandler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classA utility class for keeping track of the qName and how the SAX parser passed attributes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) delegates characters to SAX2ANY.commonStartElement(String name, String namespace, boolean wsPreserve) Delegates startElement to SAX2ANY.voidendElement(String name) Delegates endElement to SAX2ANY.voidendPrefixMapping(String prefix) delegates endPrefixMapping to SAX2ANY.Returns SAX2ANY startingNode.booleanChecks if there is a SAX2ANY objectvoidignorableWhitespace(char[] ch, int start, int length) delegates ignorableWhitespace call to SAX2ANY.booleanChecks if any branch depth counter is zero.voidpreservePassedArguments(String name, AttributeList attList) Preserves passed name and attributes.voidpreservePassedArguments(String name, Attributes atts) Preserves passed name and attributes.voidstartElement(String namespaceURI, String localName, String qName, Attributes atts) Delegates SAX2 startElement to SAX2ANY.voidstartElement(String name, AttributeList attList) Delegates SAX1 startElement to SAX2ANY.voidstartPrefixMapping(String prefix, String uri) delegates startPrefixMapping to SAX2ANY.
-
Constructor Details
-
AnyNodeUnmarshalHandler
-
-
Method Details
-
commonStartElement
public Object commonStartElement(String name, String namespace, boolean wsPreserve) throws SAXException Delegates startElement to SAX2ANY. Sets any branch depth counter to 1.- Parameters:
name- Name of the element if we use SAX 2namespace- Namespace of the elementwsPreserve- preserve whitespaces ?- Returns:
- Object anyUnmarshaller get StartingNode
- Throws:
SAXException
-
ignorableWhitespace
delegates ignorableWhitespace call to SAX2ANY.- Parameters:
ch- Charactersstart- Offsetlength- Length- Throws:
SAXException
-
startElement
Delegates SAX1 startElement to SAX2ANY. Increases any branch depth counter.- Parameters:
name- Name of the element.attList- Attribute list.- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException Delegates SAX2 startElement to SAX2ANY. Increases any branch depth counter.- Parameters:
namespaceURI-localName-qName-atts-- Throws:
SAXException
-
endElement
Delegates endElement to SAX2ANY.- Parameters:
name-- Throws:
SAXException
-
characters
delegates characters to SAX2ANY.- Parameters:
ch-start-length-- Throws:
SAXException
-
startPrefixMapping
delegates startPrefixMapping to SAX2ANY.- Parameters:
prefix-uri-- Throws:
SAXException
-
endPrefixMapping
delegates endPrefixMapping to SAX2ANY.- Parameters:
prefix-- Throws:
SAXException
-
hasAnyUnmarshaller
public boolean hasAnyUnmarshaller()Checks if there is a SAX2ANY object- Returns:
- True if there is a SAX2ANY.
-
isStartingNode
public boolean isStartingNode()Checks if any branch depth counter is zero.- Returns:
- true if 0
-
getStartingNode
Returns SAX2ANY startingNode.- Returns:
-
preservePassedArguments
Preserves passed name and attributes.- Parameters:
name- Nameatts- Attributes
-
preservePassedArguments
Preserves passed name and attributes.- Parameters:
name- NameattList- AttributeList
-