This chapter contains the following sections:
Table 4-1 summarizes the methods available through the Event
interface.
Table 4-1 Summary of Event Methods
Function | Summary |
---|---|
Cleans up intenal structures related to a parse operation. This will not destroy the event context. The event context can be reused after this call. |
|
Creates an Event context in pull-parse mode. |
|
Creates an event context for the streaming validadtor. |
|
Destroys the event context. Terminates parsing. May be called at any time during a parsing operation. |
|
Terminates an event context created by a streaming validator. |
|
Retrieves the number of attributes for the |
|
Retrieves the attribute body in attribute declaration |
|
Retrieves the |
|
Retreives the number of attributes in attribute declaration |
|
Retrieves the element name in attribute declaration |
|
Retrieves the |
|
Retrieves the local name in attribute declaration |
|
Retrieves the |
|
Retrieves the attribute name in attribute declaration |
|
Retrieves the |
|
Retrieves the attribute prefix in attribute declaration |
|
Retrieves the |
|
Retrieves the ID for the attribute's |
|
Retrieves the attribute local name for the |
|
Retrieves the |
|
Retrieves the attribute name for the |
|
Retrieves the |
|
Retrieves the prefix tag for |
|
Retrieves the |
|
Retrieves the attribute URI for the |
|
Retrieves the |
|
Retrieves the ID for the attribute's URI, for |
|
Retrieves the attribute value for one of the |
|
Retrieves the |
|
Retrieves the element declaration content for |
|
Retrieves the element declaration content for |
|
Returns the value of the encoding specified. |
|
Retrieves the error number when the |
|
Retrurns the name of for either |
|
Retrieves a |
|
Retrieves the local name tag for either |
|
Retrieves a |
|
Retrieves the location during parsing, as |
|
Retrieves the text for |
|
Retrieves |
|
Retrieves the target for |
|
Retrieves the |
|
Determines if the general entity was declared, |
|
Retrieves the replacement text of PE declaration, |
|
Retrieves the |
|
Retrieves the prefix tag for one of either |
|
Retrieves the prefix tag for one of either |
|
Retrieves the public id for |
|
Retrieves the |
|
Retrieves the system id for |
|
Retrieves the |
|
Retrieves the ID for the tag's |
|
Retrieves the ID for the tag's URI, for |
|
Retrieves the text for |
|
Retrieves the |
|
Retrieves the ndata for |
|
Retrieves the |
|
Retrieves the URI tag for |
|
Retrieves the |
|
Provides information about version specification in XML declaration for the |
|
Provides information about encoding specification in XML declaration for the |
|
Determines if an attribute is a namespace atrribute for |
|
Provides information about standalone specification in XML declaration for the |
|
Gets the next event and advances the parser. |
|
Advances the parser to the next tag event. |
|
Loads a new document and configures it for pull parsing. |
|
Validates XML documents represented by events. |
Cleans up intenal structures related to a parse operation. This will not destroy the event context. The event context can be reused after this call.
xmlerr XmlEvCleanPPCtx( xmlctx *xctx, xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
evtx |
IN |
XmlEvents context |
(xmlerr)
the error number
Creates an Event context in pull-parse mode.
The document is loaded using XmlEvLoadPPDoc. The actual parsing is driven by multiple calls to XmlEvNext(). After each call, relevant information may be retrieved by calls to the various XmlEvGet
XXX
() functions. Basic set of properties are the same as for XmlLoadDom
. Input source should be specified with XmlEvLoadPPDoc() call.
xmlevctx *XmlEvCreatePPCtx(
xmlctx *xctx,
xmlerr *xerr,
list);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
xerr |
IN |
numeric error code, XMLERR_OK[0] on success |
list
|
IN |
These additional properties should be supplied with a terminal NULL :
These optional parameters should be used in the following manner: xmlevctx *XmlEvCreatePPCtx( xmlctx *xctx, xmlerr *xerr, ("expand_entities", mode), ("use_buffer", buffer), ("use_buffer_len", length), ("get_id_callback", function), ("raw_buffer_len", length), ("error_callback", callback) ); |
(xmlevctx)
Event contex to be passed on subsequent calls to XmlEvNext()
Creates an event context for the streaming validadtor. Initializes the streaming validator and returns an event context that can be used in subsequent calls.
Use in conjunction with XmlEvDestroySVCtx(). This is a transparent method. An alternate approach would be to use the opague XmlEvSchemaValidate().
xmlevctx *XmlEvCreateSVCtx( xmlctx *xctx, xsdctx *sctx, xmlevctx *docEvCtx, xmlerr *err);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context; must be valid |
sctx |
IN |
Schema context; must be valid |
docEvCtx |
IN |
Event context for the document that is validated |
err |
OUT |
numeric error code, XMLERR_OK[0] on success |
(xmlevctx)
Event contex to be passed on subsequent calls to XmlEvNext()
Destroys the event context. Terminates parsing. May be called at any time during a parsing operation.
void XmlEvDestroyPPCtx( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Terminates an event context created by a streaming validator. Returns XMLERR_OK[0]
on success, or a numeric error code on failure.
Use in conjunction with XmlEvCreateSVCtx(). This is a transparent method. An alternate approach would be to use the opague XmlEvSchemaValidate().
xmlerr XmlEvDestroySVCtx( xmlctx *xctx, xmlevctx *evCtx);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
evCtx |
IN |
Event context that should be terminatedt |
(xmlerr)
the error number
Retrieves the number of attributes for the XML_EVENT_START_ELEMENT
event.
ub4 XmlEvGetAttrCount( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(ub4)
the number of attributes
Retrieves the attribute body in attribute declaration XML_EVENT_ATTLIST_DECLARATION
. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetAttrDeclBody( xmlevctx *evctx, ub4 index, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
len |
OUT |
the length |
(oratext*)
the declaration body
Retrieves the NULL
-terminated attribute body in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
oratext *XmlEvGetAttrDeclBody0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
(oratext*)
the declaration body
Retreives the number of attributes in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
ub4 XmlEvGetAttrDeclCount( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(ub4)
number of attributes
Retrieves the element name in attribute declaration XML_EVENT_ATTLIST_DECLARATION
. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetAttrDeclElName( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
(oratext*)
the element name
Retrieves the NULL
-terminated element name in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
oratext *XmlEvGetAttrDeclElName0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
the element name
Retrieves the local name of the attribute declaration event, XML_EVENT_ATTLIST_DECLARATION
. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetAttrDeclLocalName( xmlevctx *evctx, ub4 index ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
len |
OUT |
the length |
(oratext*)
the local name
Retrieves the NULL
-terminated local name in attribute declaration event, XML_EVENT_ATTLIST_DECLARATION
.
oratext *XmlEvGetAttrDeclLocalName0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
(oratext*)
the local name
Retrieves the attribute name in attribute declaration XML_EVENT_ATTLIST_DECLARATION
. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetAttrDeclName( xmlevctx *evctx, ub4 index ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
len |
OUT |
the length |
(oratext*)
the attribute name
Retrieves the NULL
-terminated attribute name in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
oratext *XmlEvGetAttrDeclName0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
(oratext*)
the attribute name
Retrieves the attribute prefix in attribute declaration XML_EVENT_ATTLIST_DECLARATION
. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetAttrDeclPrefix( xmlevctx *evctx, ub4 index ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
len |
OUT |
the length |
(oratext*)
the attribute prefix
Retrieves the NULL
-terminated attribute prefix in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
oratext *XmlEvGetAttrDeclPrefix0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
(oratext*)
the attribute prefix
Retrieves the ID for the attribute's QNAME
, for XML_EVENT_START_ELEMENT
events. Invokes the user-supplied ID callback specified in XmlEvCreatePPCtx(); if the callback is not specified, returns 0
.
sb8 XmlEvGetAttrID( xmlevctx *evctx ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of attribute |
(sb8)
the ID
Retrieves the attribute local name for the XML_EVENT_START_ELEMENT
events. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetAttrLocalName( xmlevctx *evctx, ub4 index ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute; ignored for XML_EVENT_START_ATTR |
len |
OUT |
the length |
(oratext*)
the attribute name
Retrieves the NULL
-terminated attribute local name for the XML_EVENT_START_ELEMENT
events.
oratext *XmlEvGetAttrLocalName0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute; ignored for XML_EVENT_START_ATTR |
(oratext*)
the attribute name
Retrieves the attribute name for the XML_EVENT_START_ELEMENT
events. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetAttrName( xmlevctx *evctx, ub4 index ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute; ignored for XML_EVENT_START_ATTR |
len |
OUT |
the length |
(oratext*)
the attribute name
Retrieves the NULL
-terminated attribute name for the XML_EVENT_START_ELEMENT
events.
oratext *XmlEvGetAttrName0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute; ignored for XML_EVENT_START_ATTR |
(oratext*)
the attribute name
Retrieves the prefix tag for XML_EVENT_START_ELEMENT
events, and also returns the length of the event as an OUT len
parameter.
oratext *XmlEvGetAttrPrefix( xmlevctx *evctx, ub4 index, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
len |
OUT |
length of the event name |
(oratext*)
the attribute prefix
Retrieves the NULL
-terminated attribute prefix for the XML_EVENT_START_ELEMENT
events.
oratext *XmlEvGetAttrPrefix0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
(oratext*)
the attribute prefix
Retrieves the attribute URI for the XML_EVENT_START_ELEMENT
events. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetAttrURI( xmlevctx *evctx, ub4 index ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
len |
OUT |
the length |
(oratext*)
the attribute URI
Retrieves the NULL
-terminated attribute URI for the XML_EVENT_START_ELEMENT
events.
oratext *XmlEvGetAttrURI0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
(oratext*)
the attribute URI
Retrieves the ID for the attribute's URI, for XML_EVENT_START_ELEMENT
events. Invokes the user-supplied ID callback specified in XmlEvCreatePPCtx(); if the callback is not specified, returns 0
.
sb8 XmlEvGetAttrUriID( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of attribute |
(sb8)
the ID
Retrieves the attribute value for one of the XML_EVENT_START_ELEMENT
events, and also returns the length of the event as an OUT len
parameter.
oratext *XmlEvGetAttrValue( xmlevctx *evctx, ub4 index, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
len |
OUT |
length of the event name |
(oratext*)
the attribute value
Retrieves the NULL
-terminated attribute value for the XML_EVENT_START_ELEMENT
events.
oratext *XmlEvGetAttrValue0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
(oratext*)
the attribute value
Retrieves the element declaration content for XML_EVENT_ELEMENT_DECLARATION
. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetElDeclContent( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
(oratext*)
the declaration content
Retrieves the element declaration content for XML_EVENT_ELEMENT_DECLARATION
.
oratext *XmlEvGetElDeclContent0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
the declaration content
Returns the value of the encoding specified in either XmlEvCreatePPCtx() call or XmlEvCreateSVCtx() call.
oratext *XmlEvGetEncoding( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
the encoding value in out-encoding; NULL
if no encoding is specified
Retrieves the error number when the XML_EVENT_FATAL_ERROR
or XML_EVENT_ERROR
event is returned by a XmlEvNext() call.
xmlerr XmlEvGetError( xmlevctx *evctx oratext **message);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
message |
IN |
the error message |
(xmlerr)
the error number
Retrurns the name of the events, and the length of the event in the OUT
len
parameter. The event name could be on of the following:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
XML_EVENT_START_ENTITY
XML_EVENT_ENTITY_REFERENCE
XML_EVENT_ELEMENT_DECLARATION
XML_EVENT_PE_DECLARATION
XML_EVENT_UE_DECLARATION
XML_EVENT_NOTATTION_DECLARATION
oratext *XmlEvGetName( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the name |
(oratext*)
The name
Retrieves a NULL
-terminated name for one of the following events:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
XML_EVENT_START_ENTITY
XML_EVENT_ENTITY_REFERENCE
XML_EVENT_ELEMENT_DECLARATION
XML_EVENT_PE_DECLARATION
XML_EVENT_UE_DECLARATION
XML_EVENT_NOTATTION_DECLARATION
oratext *XmlEventGetName0( xmleventctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
The name
Retrieves the local name tag for one of the following events, and also returns the length of the event as an OUT len
parameter:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
oratext *XmlEvGetLocalName( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
(oratext*)
local name tag
Retrieves the NULL
-terminated local name tag for one of the following events:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
oratext *XmlEvGetLocalName0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
local name tag
Retrieves the location during parsing, as OUT
parameters for the line number of the input stream and its path. Can be used at any time during the parsing processes.
void *XmlEvGetLocation( xmlevctx *evctx, ub4 *line, oratext **path);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
line |
OUT |
line number |
path |
OUT |
URL or file name |
Retrieves the text for one of the following events, and also returns the length of the event as an OUT len
parameter:
XML_EVENT_PI
XML_EVENT_PI_CONT
oratext *XmlEvGetPIData( xmlevctx *evctx ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
(oratext*)
data
Retrieves the NULL
-terminated data for one of the following events:
XML_EVENT_PI
XML_EVENT_PI_CONT
oratext *XmlEvGetPIData0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
data
Retrieves the target for one of the following events, and also returns the length of the event as an OUT len
parameter:
XML_EVENT_PI
XML_EVENT_PI_CONT
oratext *XmlEvGetPITarget( xmlevctx *evctx ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
(oratext*)
target
Retrieves the NULL
-terminated target for one of the following events:
XML_EVENT_PI
XML_EVENT_PI_CONT
oratext *XmlEvGetPITarget0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
target
Determines if the general entity was declared, XML_EVENT_PE_DECLARATION
.
boolean XmlEvGetPEIsGen( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
TRUE
for a general entity, FALSE
if a parameter
Retrieves the replacement text of PE declaration, XML_EVENT_PE_DECLARATION
. Also, provides the length as an OUT len
parameter.
oratext *XmlEvGetPERepl( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
(oratext*)
PE replacement text
Retrieves the NULL
-terminated replacement text of PE declaration, XML_EVENT_PE_DECLARATION
.
oratext *XmlEvGetPERepl0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
PE replacement text
Retrieves the prefix tag for one of the following events, and also returns the length of the event as an OUT len
parameter:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
oratext *XmlEvGetPrefix( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the prefix |
(oratext*)
the prefix tag
Retrieves the NULL
-terminated prefix tag for one of the following events:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
oratext *XmlEvGetPrefix0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
the prefix tag
Retrieves the public id for one of the following events; also, provides the length as an OUT len
parameter:
XML_EVENT_PE_DECLARATION
XML_EVENT_UE_DECLARATION
XML_EVENT_NOTATION_DECLARATION
oratext *XmlEvGetPubId( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
(oratext*)
public id
Retrieves the NULL
-terminated public id for one of the following events:
XML_EVENT_PE_DECLARATION
XML_EVENT_UE_DECLARATION
XML_EVENT_NOTATION_DECLARATION
oratext *XmlEvGetPubId0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
public id
Retrieves the system id for one of the following events; also, provides the length as an OUT len
parameter:
XML_EVENT_PE_DECLARATION
XML_EVENT_UE_DECLARATION
XML_EVENT_NOTATION_DECLARATION
oratext *XmlEvGetSysId( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
(oratext*)
system id
Retrieves the NULL
-terminated system id for one of the following events:
XML_EVENT_PE_DECLARATION
XML_EVENT_UE_DECLARATION
XML_EVENT_NOTATION_DECLARATION
oratext *XmlEvGetSysId0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
system id
Retrieves the ID for the tag's QNAME
, for XML_EVENT_START_ELEMENT
events. Invokes the user-supplied ID callback specified in XmlEvCreatePPCtx(); if the callback is not specified, returns 0
.
sb8 XmlEvGetTagID( xmlevctx *evctx)
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(sb8)
the ID
Retrieves the ID for the tag's URI, for XML_EVENT_START_ELEMENT
and XML_EVENT_END_ELEMENT
events. Invokes the user-supplied ID callback specified in XmlEvCreatePPCtx(); if the callback is not specified, returns 0
.
sb8 XmlEvGetTagUriID( xmlevctx *evctx)
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(sb8)
the ID
Retrieves the text for one of the following events, and also returns the length of the event as an OUT len
parameter:
XML_EVENT_CHARACTERS
XML_EVENT_CHARACTERS_CONT
XML_EVENT_SPACE
XML_EVENT_SPACE_CONT
XML_EVENT_COMMENT
XML_EVENT_COMMENT_CONT
XML_EVENT_CDATA
XML_EVENT_CDATA_CONT
oratext *XmlEvGetText( xmlevctx *evctx ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
(oratext*)
event text
Retrieves the NULL
-terminated text for one of the following events:
XML_EVENT_CHARACTERS
XML_EVENT_CHARACTERS_CONT
XML_EVENT_SPACE
XML_EVENT_SPACE_CONT
XML_EVENT_COMMENT
XML_EVENT_COMMENT_CONT
XML_EVENT_CDATA
XML_EVENT_CDATA_CONT
oratext *XmlEvGetText0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
event text
Retrieves the ndata for XML_EVENT_UE_DECLARATION
event, and also returns the length of the event as an OUT len
parameter.
oratext *XmlEvGetUENdata( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
(oratext*)
ndata
Retrieves the NULL
-terminated ndata for XML_EVENT_UE_DECLARATION
event.
oratext *XmlEvGetUENdata0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
ndata
Retrieves the URI tag for one of the following events, and also returns the length of the event as an OUT len
parameter:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
oratext *XmlEvGetURI( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
(oratext*)
URI tag
Retrieves the NULL
-terminated URI tag for one of the following events:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
oratext *XmlEvGetURI0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
URI tag
Provides information about version specification in XML declaration for the XML_EVENT_START_DOCUMENT
event.
oratext *XmlEvGetVersion( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(oratext*)
version string from the XML declaration.
Provides information about encoding specification in XML declaration for the XML_EVENT_START_DOCUMENT
event.
boolean XmlEvIsEncodingSpecified( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
TRUE
if encoding was specified in XML declaration, FALSE
otherwise
Determines if an attribute is a namespace atrribute for XML_EVENT_START_ELEMENT
event.
boolean XmlEvIsNamespaceAttr( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
TRUE
if an attribute is a namespace attribute, FALSE
otherwise
Provides information about standalone specification in XML declaration for the XML_EVENT_START_DOCUMENT
event.
sword XmlEvIsStandalone( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Events contextt |
(sword)
-1
if standalone was not specified in the XML declaration, 0
if FALSE
was specified for standalone, and 1
if TRUE
was specified for standalone
Gets the next event; advances the parser.
xmlevtype XmlEvNext( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(xmlevtype)
the event
Advances the parser to the next tag event, such as XML_EVENT_START_ELEMENT
, XML_EVENT_END_ELEMENT
, and XML_EVENT_END_DOCUMENT
.
xmlevtype XmlEvNextTag( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
(xmlevtype)
the event
Loads a new document and sets it up for pull parsing. Prepares to start parsing the XML document from an input source in pull-parse mode. Input sources are the same as for XmlLoadDom() and XmlLoadSax() of Chapter 11, "Package XML APIs for C". The actual parsing is driven by multiple calls to XmlEvNext().
xmlerr XmlEvLoadPPDoc( xmlctx *xctx, xmlevctx *evctx, oratext *inputType, void *input, ub4 inputLen, oratext *inputEncoding);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
evctx |
IN |
XML Events contextt |
inputType |
IN |
type of input, such as file, buffer, uri, stream, or stdio |
input |
IN |
the input |
inputLen |
IN |
input length for buffer input type |
inputEncoding |
IN |
input encoding |
(xmlerr)
the error code
Validates XML documents represented by events. Initializes the stream validator.
This is an opaque method. An alternate approach would be to use the transparent XmlEvCreateSVCtx() and XmlEvDestroySVCtx().
xmlerr XmlEvSchemaValidate( xmlctx *xctx, xsdctx *sctx, xmlevctx *docEvCtx, oratext **errmsg);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
sctx |
IN |
Schema context |
docEvCtx |
IN |
Event context for the document that is validated |
errmsg |
OUT |
The error message that corresponds to the error code |
(xmlerr)
the error code