|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParserExtension
The ParserExtension interface allows developers to extend node parsing remotely developed by adding new attributes or child elements. Clients can register one global ParserExtension per namespace. (We might restrict this to one ParserExtension per object Class, but this would require NodeParser API changes.)
Method Summary | |
---|---|
java.lang.Object |
elementEnded(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.Object parsed,
java.util.Map<?,?> values)
Called after parsing of the parent element has completed with extension values still to be processed. |
void |
elementStarted(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
java.util.Map<?,?> attributes)
Called before parsing of the parent element has started. |
NodeParser |
startExtensionElement(ParseContext context,
java.lang.String namespaceURI,
java.lang.String localName,
org.xml.sax.Attributes attrs)
Called to notify that a child element has been found that was not handled by the outer parser. |
Method Detail |
---|
void elementStarted(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, java.util.Map<?,?> attributes) throws org.xml.sax.SAXParseException
context
- the parsing contextnamespaceURI
- the namespace of the element being processedlocalName
- the local name of the elementattributes
- a Map of all the attributes in the
namespace of this extension. This dictionary does
not include values handled by extension NodeParsers.
org.xml.sax.SAXParseException
NodeParser startExtensionElement(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXParseException
context
- the parsing contextnamespaceURI
- the namespace of the child elementlocalName
- the local name of the elementattrs
- the attributes attached to the element.
org.xml.sax.SAXParseException
java.lang.Object elementEnded(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, java.lang.Object parsed, java.util.Map<?,?> values) throws org.xml.sax.SAXParseException
context
- the parsing contextnamespaceURI
- the namespace of the element being processedlocalName
- the local name of the elementparsed
- the object instantiated for the elementvalues
- a Map of all the attributes in the
namespace of this extension, plus values returned
by child elements.
org.xml.sax.SAXParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |