Package com.luciad.format.xml
Interface ILcdXMLElementVisitor
public interface ILcdXMLElementVisitor
Deprecated.
Interface for visiting XML elements.
Implentations of this interface (called visitors) can be passed to objects that have an XML structure
(called visitables). The visitable will generate events (call the methods of the visitor) for each
XML declaration in the XML structure (elements, attributes, contents, ...).
The order in which the methods are called, is fixed. For a given XML element, the calling order
is as follows:
- First, the
startElement()
method is called, declaring the start of a new XML element. - For each prefix mapping that is introduced, the
prefix()
method is called. This has to be done only once for each prefix mapping, in the element where the prefix is first used (or higher in the XML hierarchy). - For each attribute in the current element, the
attribute()
method is called. - Then, for each content of the current element, either the
content()
method is called, or a recursive call tostartElement()
(and the other methods), depending on whether the content is a primitive block of character data, or a new XML child element, or . The order in which they are called, should correspond to the order they are present in the parent element. - Finally, after all contents have been processed, the
endElement()
method is called.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attribute
(TLcdXMLName aXMLName, Object aValue, String aValueAsString) Deprecated.Notifies the presence of an attribute in the current XML element.void
Deprecated.Notifies the presence of character content in the current XML element.void
endElement
(ILcdXMLNameStack aElementNameStack, ILcdXMLObjectStack aObjectStack) Deprecated.Notifies that the current XML element has been ended.void
Deprecated.Notifies that a new prefix mapping is used within the scope of the current XML element.boolean
startElement
(ILcdXMLNameStack aElementNameStack, ILcdXMLObjectStack aObjectStack, Object aVisitable) Deprecated.Notifies that a new XML element has been entered.
-
Method Details
-
startElement
boolean startElement(ILcdXMLNameStack aElementNameStack, ILcdXMLObjectStack aObjectStack, Object aVisitable) throws TLcdXMLInterruptedException Deprecated.Notifies that a new XML element has been entered.- Parameters:
aElementNameStack
- the current XML element name stack, containing on top the name of the new XML element that has been entered.aObjectStack
- the current XML object stack, containing on top the new XML element object that has been entered.aVisitable
- the visitable object that is used to visit the current XML element. Note that this is not always the object that was initially called to initiate the visit action: a visitable implementation might delegate the visit action of its children to a specialized visitable implementation, in which case the specialized visitable(s) will be passed to the visitor, for each of the children.- Returns:
true
if the contents of the current XML element should be visited,false
if they should be skipped (in the latter case, the prefixes and attributes are still visited, directly followed by anendElement()
call).- Throws:
TLcdXMLInterruptedException
- if the visit action has to be interrupted.
-
prefix
Deprecated.Notifies that a new prefix mapping is used within the scope of the current XML element.- Parameters:
aNamespaceURI
- the XML namespace which is mapped to the specified prefix.aPrefix
- the prefix to which the specified namespace is mapped.- Throws:
TLcdXMLInterruptedException
- if the visit action has to be interrupted.
-
attribute
void attribute(TLcdXMLName aXMLName, Object aValue, String aValueAsString) throws TLcdXMLInterruptedException Deprecated.Notifies the presence of an attribute in the current XML element.- Parameters:
aXMLName
- the XML attribute nameaValue
- the value of the attributeaValueAsString
- the value of the attribute, as a formatted string, compliant with XML. Escaping of special characters should not be performed.- Throws:
TLcdXMLInterruptedException
- if the visit action has to be interrupted.
-
content
Deprecated.Notifies the presence of character content in the current XML element.- Parameters:
aContent
- the XML contentaContentAsString
- the content, as a formatted string, compliant with XML. Escaping of special characters should not be performed.- Throws:
TLcdXMLInterruptedException
- if the visit action has to be interrupted.
-
endElement
void endElement(ILcdXMLNameStack aElementNameStack, ILcdXMLObjectStack aObjectStack) throws TLcdXMLInterruptedException Deprecated.Notifies that the current XML element has been ended.- Parameters:
aElementNameStack
- the current XML element name stack, containing on top the name of the new XML element that is ended.aObjectStack
- the current XML object stack, containing on top the new XML element object that is ended.- Throws:
TLcdXMLInterruptedException
- if the visit action has to be interrupted.
-
com.format.xml
API has been deprecated. Instead, use thecom.format.xml.bind
API.