: Class XMLParser
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
quicktime.std.qtcomponents
Class XMLParser
java.lang.Object
|
+--quicktime.QTObject
|
+--quicktime.std.comp.ComponentIdentifier
|
+--quicktime.std.comp.Component
|
+--quicktime.std.qtcomponents.XMLParser
All Implemented Interfaces: InterfaceLib, PrimitivesLib, QuickTimeLib, SharedLibrary, com.apple.jdirect.SharedLibrary
public final class XMLParserextends Componentimplements QuickTimeLib
The XMLParser corresponds to the QuickTime XMLParse component, type 'pars' subtype 'xml '
Fields inherited from interface quicktime.jdirect.QuickTimeLib
JDirect_MacOSX, libraryInstance, name
Constructor Summary
XMLParser()
Method Summary
int
addAttribute(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID)
tell the parser of an attribute for the specified element in the specified namespace
int
addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
boolean attributeBooleanValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindBoolean value,
as specified by attributeValueKind and attributeValueKindInfo
int
addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
byte attributeOnOffValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindOnOff value,
as specified by attributeValueKind and attributeValueKindInfo
int
addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
float attributePercentValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindPercent value,
as specified by attributeValueKind and attributeValueKindInfo
int
addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
int attributeIntegerValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindInteger value,
as specified by attributeValueKind and attributeValueKindInfo
int
addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
int attributeValueKind,
byte[] attributeValueKindInfo)
tell the parser of an attribute, which may have a particular type of value, for the specified element
int
addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
QDColor attributeColorValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindColor value,
as specified by attributeValueKind and attributeValueKindInfo
int
addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
java.lang.String attributeValue)
tell the parser of an attribute, of type attributeValueKindCharString, for the specified element
int
addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
java.lang.String[] attributeList,
boolean caseSensitive)
tell the parser of an enumerated attribute, of type attributeValueKindEnum or attributeValueKindCaseSensEnum, for the specified element
void
addAttributeValueKind(int elementID,
int attributeID,
boolean attributeBooleanValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindBoolean value,
as specified by attributeValueKind and attributeValueKindInfo
void
addAttributeValueKind(int elementID,
int attributeID,
byte attributeOnOffValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindOnOff value,
as specified by attributeValueKind and attributeValueKindInfo
void
addAttributeValueKind(int elementID,
int attributeID,
float attributePercentValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindPercent value,
as specified by attributeValueKind and attributeValueKindInfo
void
addAttributeValueKind(int elementID,
int attributeID,
int attributeValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindInteger value,
as specified by attributeValueKind and attributeValueKindInfo
void
addAttributeValueKind(int elementID,
int attributeID,
int attributeValueKind,
byte[] attributeValueKindInfo)
tell the parser that the particular attribute of an element may have an additional kind of value,
as specified by attributeValueKind and attributeValueKindInfo
void
addAttributeValueKind(int elementID,
int attributeID,
QDColor attributeColorValue)
tell the parser that the particular attribute of an element may have an additional attributeValueKindColor value,
as specified by attributeValueKind and attributeValueKindInfo
void
addAttributeValueKind(int elementID,
int attributeID,
java.lang.String attributeStringValue)
tell the parser of an enumerated attribute, of type attributeValueKindCharString, for the specified element
void
addAttributeValueKind(int elementID,
int attributeID,
java.lang.String[] attributeList,
boolean caseSensitive)
tell the parser of an enumerated attribute, of type attributeValueKindEnum or attributeValueKindCaseSensEnum, for the specified element
int
addElement(java.lang.String elementName,
int nameSpaceID,
int elementID,
int elementFlags)
tell the parser of an element to be recognized in the specified namespace
void
addNameSpace(int nameSpaceID,
java.lang.String nameSpaceURL)
tell the parser of a namespace to be recognized
int
addNameSpace(java.lang.String nameSpaceURL)
tell the parser of an identified namespace to be recognized
void
eventParse(DataRef dataRef,
boolean allowUppercase,
boolean allowUnquotedAttributeValues)
Parses the XML file pointed to by dataRef, using event-based parsing.
void
eventParse(QTFile file,
boolean allowUppercase,
boolean allowUnquotedAttributeValues)
Parses the XML file pointed to by file, using event-based parsing.
java.lang.String
getParseErrorDescription()
Returns a more detailed description of the error if a file failed to parse properly
int
getParseErrorLine()
Returns the line number the error if a file failed to parse properly
XMLDoc
parse(DataRef dataRef,
boolean allowUppercase,
boolean allowUnquotedAttributeValues)
parses the XML file pointed to by dataRef, returning a XMLParseTree parse tree
XMLDoc
parse(QTFile file,
boolean allowUppercase,
boolean allowUnquotedAttributeValues)
Parses the XML file pointed to by file, returning a XMLDoc parse tree
void
removeCharDataHandler()
Remove the currently registered callback handler for character data events.
void
removeCommentHandler()
Remove the currently registered callback handler for comment events
void
removeEndDocumentHandler()
Remove the currently registered callback handler for end document events
void
removeEndElementHandler()
Remove the currently registered end element proc.
void
removePreprocessorHandler()
Remove the currently registered callback handler for preprocessor instruction events
void
removeStartDocumentHandler()
Remove the currently registered callback handler for start document events
void
removeStartElementHandler()
Remove the currently registered start element proc.
void
setCharDataHandler(XMLCharDataProc proc)
Set the callback handler for character data events
void
setCommentHandler(XMLCommentProc proc)
Set the callback handler for comment events
void
setEndDocumentHandler(XMLEndDocProc proc)
Set the callback handler for end document events
void
setEndElementHandler(XMLEndElementProc proc)
set the end element handler UPP for event parsing
void
setOffsetAndLimit(int offset,
int limit)
specify the offset and limit for reading from the dataref to be used when parsing
void
setPreprocessorHandler(XMLPreprocessorProc proc)
Set the callback handler for preprocessor instruction events
void
setStartDocumentHandler(XMLStartDocProc proc)
Set the callback handler for start document events
void
setStartElementHandler(XMLStartElementProc proc)
set the start element handler UPP for event parsing
Methods inherited from class quicktime.std.comp.Component
count
Methods inherited from class quicktime.std.comp.ComponentIdentifier
find, find, getInfo, toString
Methods inherited from class quicktime.QTObject
disposeQTObject, equals, ID
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
XMLParser
public XMLParser()
throws QTException
Method Detail
parse
public XMLDoc parse(DataRef dataRef,
boolean allowUppercase,
boolean allowUnquotedAttributeValues)
throws StdQTException,
QTException
parses the XML file pointed to by dataRef, returning a XMLParseTree parse tree
Parameters:dataref - allowUppercase - to set StdQTConstants5.xmlParseFlagAllowUppercase flagallowUnquotedAttributeValues - to set StdQTConstants5.xmlParseFlagAllowUnquotedAttributeValues flagReturns:XMLParseTree
parse
public XMLDoc parse(QTFile file,
boolean allowUppercase,
boolean allowUnquotedAttributeValues)
throws StdQTException,
QTException
Parses the XML file pointed to by file, returning a XMLDoc parse tree
Parameters:file - open for readallowUppercase - to set StdQTConstants5.xmlParseFlagAllowUppercase flagallowUnquotedAttributeValues - to set StdQTConstants5.xmlParseFlagAllowUnquotedAttributeValues flagReturns:XMLDoc
eventParse
public void eventParse(DataRef dataRef,
boolean allowUppercase,
boolean allowUnquotedAttributeValues)
throws StdQTException,
QTException
Parses the XML file pointed to by dataRef, using event-based parsing. Does not return a parse tree
Parameters:dataref - allowUppercase - to set StdQTConstants5.xmlParseFlagAllowUppercase flagallowUnquotedAttributeValues - to set StdQTConstants5.xmlParseFlagAllowUnquotedAttributeValues flag
eventParse
public void eventParse(QTFile file,
boolean allowUppercase,
boolean allowUnquotedAttributeValues)
throws StdQTException,
QTException
Parses the XML file pointed to by file, using event-based parsing. Does not return a parse tree
Parameters:file - open for readallowUppercase - to set StdQTConstants5.xmlParseFlagAllowUppercase flagallowUnquotedAttributeValues - to set StdQTConstants5.xmlParseFlagAllowUnquotedAttributeValues flag
addElement
public int addElement(java.lang.String elementName,
int nameSpaceID,
int elementID,
int elementFlags)
throws StdQTException
tell the parser of an element to be recognized in the specified namespace
Parameters:elementName - namenameSpaceID - tokenized identifier, can be nameSpaceIDNoneelementID - tokenized identifier, zero or unique identifierelementFlags - flagsReturns:tokenized element identifier if elementID non zero, is elementID else generated unique non zero element identifier
addAttribute
public int addAttribute(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID)
throws StdQTException
tell the parser of an attribute for the specified element in the specified namespace
Parameters:elementID - non zero unique tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameelementID - zero or unique elementIDReturns:attribute identifier token if attributeID non zero, is elementID else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeValueKind
public void addAttributeValueKind(int elementID,
int attributeID,
int attributeValueKind,
byte[] attributeValueKindInfo)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional kind of value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero unique tokenized element identifierattributeID - non zero unique tokenized attribute identifierattributeValueKind - attributeValueKindInfo - Throws:on - zero elementIDon - zero attributeID
addAttributeValueKind
public void addAttributeValueKind(int elementID,
int attributeID,
java.lang.String attributeStringValue)
throws StdQTException
tell the parser of an enumerated attribute, of type attributeValueKindCharString, for the specified element
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeStringValue - StringReturns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeValueKind
public void addAttributeValueKind(int elementID,
int attributeID,
int attributeValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindInteger value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero unique tokenized element identifierattributeID - non zero unique tokenized attribute identifierattributeValue - intThrows:on - zero elementIDon - zero attributeID
addAttributeValueKind
public void addAttributeValueKind(int elementID,
int attributeID,
float attributePercentValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindPercent value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero unique tokenized element identifierattributeID - non zero unique tokenized attribute identifierattributeValue - float expressing percentageThrows:on - zero elementIDon - zero attributeID
addAttributeValueKind
public void addAttributeValueKind(int elementID,
int attributeID,
boolean attributeBooleanValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindBoolean value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero unique tokenized element identifierattributeID - non zero unique tokenized attribute identifierattributeValue - booleanThrows:on - zero elementIDon - zero attributeID
addAttributeValueKind
public void addAttributeValueKind(int elementID,
int attributeID,
byte attributeOnOffValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindOnOff value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero unique tokenized element identifierattributeID - non zero unique tokenized attribute identifierattributeValue - byte 0 or 1Throws:on - zero elementIDon - zero attributeID
addAttributeValueKind
public void addAttributeValueKind(int elementID,
int attributeID,
QDColor attributeColorValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindColor value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero unique tokenized element identifierattributeID - non zero unique tokenized attribute identifierattributeColorValue - qd.QDColorThrows:on - zero elementIDon - zero attributeID
addAttributeValueKind
public void addAttributeValueKind(int elementID,
int attributeID,
java.lang.String[] attributeList,
boolean caseSensitive)
throws StdQTException
tell the parser of an enumerated attribute, of type attributeValueKindEnum or attributeValueKindCaseSensEnum, for the specified element
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeList - String[] of attributesReturns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeAndValue
public int addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
int attributeValueKind,
byte[] attributeValueKindInfo)
throws StdQTException
tell the parser of an attribute, which may have a particular type of value, for the specified element
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeValueKind - attributeValueKindInfo - Returns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeAndValue
public int addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
java.lang.String attributeValue)
throws StdQTException
tell the parser of an attribute, of type attributeValueKindCharString, for the specified element
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeValue - StringReturns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeAndValue
public int addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
int attributeIntegerValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindInteger value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeValue - intReturns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeAndValue
public int addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
float attributePercentValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindPercent value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeValue - floatReturns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeAndValue
public int addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
boolean attributeBooleanValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindBoolean value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeValue - booleanReturns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeAndValue
public int addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
byte attributeOnOffValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindOnOff value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeValue - byte 0 or 1Returns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeAndValue
public int addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
QDColor attributeColorValue)
throws StdQTException
tell the parser that the particular attribute of an element may have an additional attributeValueKindColor value,
as specified by attributeValueKind and attributeValueKindInfo
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeColorValue - qd.QDColorReturns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addAttributeAndValue
public int addAttributeAndValue(int elementID,
int nameSpaceID,
java.lang.String attributeName,
int attributeID,
java.lang.String[] attributeList,
boolean caseSensitive)
throws StdQTException
tell the parser of an enumerated attribute, of type attributeValueKindEnum or attributeValueKindCaseSensEnum, for the specified element
Parameters:elementID - non zero tokenized element identifiernameSpaceID - tokenized identifier, can be nameSpaceIDNoneattributeName - nameattributeID - non zero unique tokenized attribute identifierattributeList - String[] of attributesReturns:attribute identifier token if attributeID non zero else generated unique non zero attribute identifierThrows:on - zero elementID
addNameSpace
public void addNameSpace(int nameSpaceID,
java.lang.String nameSpaceURL)
throws StdQTException
tell the parser of a namespace to be recognized
Parameters:nameSpaceID - non zero tokenized namespace identifierThrows:on - zero nameSpaceID
addNameSpace
public int addNameSpace(java.lang.String nameSpaceURL)
throws StdQTException
tell the parser of an identified namespace to be recognized
Returns:generated non zero tokenized name space identifier
setOffsetAndLimit
public void setOffsetAndLimit(int offset,
int limit)
throws StdQTException
specify the offset and limit for reading from the dataref to be used when parsing
setStartDocumentHandler
public void setStartDocumentHandler(XMLStartDocProc proc)
throws StdQTException
Set the callback handler for start document events
Parameters:proc - implements XMLStartDocProc
removeStartDocumentHandler
public void removeStartDocumentHandler()
throws StdQTException
Remove the currently registered callback handler for start document events
setEndDocumentHandler
public void setEndDocumentHandler(XMLEndDocProc proc)
throws StdQTException
Set the callback handler for end document events
Parameters:proc - implements XMLEndDocProc
removeEndDocumentHandler
public void removeEndDocumentHandler()
throws StdQTException
Remove the currently registered callback handler for end document events
setStartElementHandler
public void setStartElementHandler(XMLStartElementProc proc)
throws StdQTException
set the start element handler UPP for event parsing
Parameters:proc - implements XMLStartElementProc
removeStartElementHandler
public void removeStartElementHandler()
throws StdQTException
Remove the currently registered start element proc.
setEndElementHandler
public void setEndElementHandler(XMLEndElementProc proc)
throws StdQTException
set the end element handler UPP for event parsing
Parameters:proc - implements XMLEndElementProc
removeEndElementHandler
public void removeEndElementHandler()
throws StdQTException
Remove the currently registered end element proc.
setCommentHandler
public void setCommentHandler(XMLCommentProc proc)
throws StdQTException
Set the callback handler for comment events
removeCommentHandler
public void removeCommentHandler()
throws StdQTException
Remove the currently registered callback handler for comment events
setCharDataHandler
public void setCharDataHandler(XMLCharDataProc proc)
throws StdQTException
Set the callback handler for character data events
Parameters:proc - implements XMLCharDataProc
removeCharDataHandler
public void removeCharDataHandler()
throws StdQTException
Remove the currently registered callback handler for character data events.
setPreprocessorHandler
public void setPreprocessorHandler(XMLPreprocessorProc proc)
throws StdQTException
Set the callback handler for preprocessor instruction events
Parameters:proc - implements XMLPreprocessorProc
removePreprocessorHandler
public void removePreprocessorHandler()
throws StdQTException
Remove the currently registered callback handler for preprocessor instruction events
getParseErrorLine
public int getParseErrorLine()
throws StdQTException
Returns the line number the error if a file failed to parse properly
Returns:line number of the error
getParseErrorDescription
public java.lang.String getParseErrorDescription()
throws StdQTException
Returns a more detailed description of the error if a file failed to parse properly
Returns:description of error