|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object processing.xml.XMLValidator
public class XMLValidator
XMLValidator implementation based on NonValidator (which implemented IXMLValidator in the original NanoXML). This implementation processes the DTD and handles entity definitions. It does not do any validation itself.
Constructor Summary | |
---|---|
XMLValidator()
Creates the "validator". |
Method Summary | |
---|---|
void |
attributeAdded(java.lang.String key,
java.lang.String value,
java.lang.String systemId,
int lineNr)
Indicates that an attribute has been added to the current element. |
void |
elementAttributesProcessed(java.lang.String name,
java.util.Properties extraAttributes,
java.lang.String systemId,
int lineNr)
This method is called when the attributes of an XML element have been processed. |
void |
elementEnded(java.lang.String name,
java.lang.String systemId,
int lineNr)
Indicates that the current element has ended. |
void |
elementStarted(java.lang.String name,
java.lang.String systemId,
int lineNr)
Indicates that an element has been started. |
XMLEntityResolver |
getParameterEntityResolver()
Returns the parameter entity resolver. |
void |
parseDTD(java.lang.String publicID,
StdXMLReader reader,
XMLEntityResolver entityResolver,
boolean external)
Parses the DTD. |
void |
PCDataAdded(java.lang.String systemId,
int lineNr)
Indicates that a new #PCDATA element has been encountered. |
void |
setParameterEntityResolver(XMLEntityResolver resolver)
Sets the parameter entity resolver. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLValidator()
Method Detail |
---|
public void setParameterEntityResolver(XMLEntityResolver resolver)
resolver
- the entity resolver.public XMLEntityResolver getParameterEntityResolver()
public void parseDTD(java.lang.String publicID, StdXMLReader reader, XMLEntityResolver entityResolver, boolean external) throws java.lang.Exception
publicID
- the public ID, which may be null.reader
- the reader to read the DTD from.entityResolver
- the entity resolver.external
- true if the DTD is external.
java.lang.Exception
- If something went wrong.public void elementStarted(java.lang.String name, java.lang.String systemId, int lineNr)
name
- the name of the element.systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.public void elementEnded(java.lang.String name, java.lang.String systemId, int lineNr)
name
- the name of the element.systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.public void elementAttributesProcessed(java.lang.String name, java.util.Properties extraAttributes, java.lang.String systemId, int lineNr)
name
- the name of the element.extraAttributes
- where to put extra attributes.systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.public void attributeAdded(java.lang.String key, java.lang.String value, java.lang.String systemId, int lineNr)
key
- the name of the attribute.value
- the value of the attribute.systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.public void PCDataAdded(java.lang.String systemId, int lineNr)
systemId
- the system ID of the XML data of the element.lineNr
- the line number in the XML data of the element.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |