Package org.exolab.castor.xml.parsing
Class AttributeSetBuilder
- java.lang.Object
-
- org.exolab.castor.xml.parsing.AttributeSetBuilder
-
public class AttributeSetBuilder extends java.lang.Object
A helper class that takes SAX v1 AttributeList or SAX v2 attributes and converts those into Castor's internalAttributeSet
representation.- Since:
- 1.3.2
- Author:
- Philipp Erlacher
-
-
Constructor Summary
Constructors Constructor Description AttributeSetBuilder(NamespaceHandling namespaceHandling)
Creates an instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSet
getAttributeSet(org.xml.sax.AttributeList atts)
Processes the attributes and XML name space declarations found in the SAX v1AttributeList
.AttributeSet
getAttributeSet(org.xml.sax.Attributes atts)
Processes the attributes and XML name space declarations found in the givenAttributes
instance.
-
-
-
Constructor Detail
-
AttributeSetBuilder
public AttributeSetBuilder(NamespaceHandling namespaceHandling)
Creates an instance of this class.- Parameters:
namespaceHandling
- Instance of a tool class to handle XML name spaces.
-
-
Method Detail
-
getAttributeSet
public AttributeSet getAttributeSet(org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
Processes the attributes and XML name space declarations found in the givenAttributes
instance. XML namespace declarations are added to the set of name spaces in scope.- Returns:
- AttributeSet,
- Throws:
org.xml.sax.SAXException
- If a name space associated with the prefix could not be resolved.
-
getAttributeSet
public AttributeSet getAttributeSet(org.xml.sax.AttributeList atts) throws org.xml.sax.SAXException
Processes the attributes and XML name space declarations found in the SAX v1AttributeList
. XML name space declarations are added to the set of XML name spaces in scope.- Returns:
- AttributeSet An internal representation of XML attributes.
- Throws:
org.xml.sax.SAXException
- If the XML name space associated with the prefix could not be resolved.
-
-