|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Classes which implement this interface allow themselves to easily be initialized from an XML file. Initialization is a three-step process:
Implementations of this interface must have a default constructor by which the instance is created for XML initialization.
Method Summary | |
void |
initializeAttributesFromXML(String uri,
String localName,
String rawName,
Attributes attributes,
IXMLResource parent)
Called when the instance is being initialized with XML attribute data. |
void |
initializeChildrenFromXML(IXMLResource[] children)
Called when the instance is being initialized with its XML children. |
void |
initializeDataFromXML(char[] ch,
int start,
int length)
Called when the instance is being initialized with XML character data. |
Method Detail |
public void initializeAttributesFromXML(String uri, String localName, String rawName, Attributes attributes, IXMLResource parent) throws SAXException
uri
- the URI of the element tag's namespace.localName
- name of the XML element tag without the namespace.rawName
- full name of the XML element, with namespace.attributes
- list of all attributes and their values and types.parent
- the parent node who contains this node. Useful if the
children need to register themselves with the parent. Can be
null
if this node has no parent.SAXException
- thrown on any kind of error.public void initializeDataFromXML(char[] ch, int start, int length) throws SAXException
ch
- a part of the XML data. It should never be used outside
the boundaries of the other parameters.start
- the start of the character data ch
where
this data is found.length
- the length of the character data in ch
where
this data is found.SAXException
- thrown on any kind of error.public void initializeChildrenFromXML(IXMLResource[] children) throws SAXException
children
- the IXMLResource
instances loaded
from the XML file, who were contained within this instance's
XML start and end tags.SAXException
- thrown on any kind of error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |