Oracle® Database XML C API Reference 11g Release 1 (11.1) Part Number B28388-01 |
|
|
View PDF |
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.
Syntax
xmlerr XmlEvCleanPPCtx( xmlctx *xctx, xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
evtx |
IN |
XmlEvents context |
Returns
(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.
Syntax
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) ); |
Returns
(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().
Syntax
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 |
Returns
(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.
Syntax
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().
Syntax
xmlerr XmlEvDestroySVCtx( xmlctx *xctx, xmlevctx *evCtx);
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
evCtx |
IN |
Event context that should be terminatedt |
Returns
(xmlerr)
the error number
Retrieves the number of attributes for the XML_EVENT_START_ELEMENT
event.
Syntax
ub4 XmlEvGetAttrCount( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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.
Syntax
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 |
Returns
(oratext*)
the declaration body
Retrieves the NULL
-terminated attribute body in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
Syntax
oratext *XmlEvGetAttrDeclBody0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
Returns
(oratext*)
the declaration body
Retreives the number of attributes in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
Syntax
ub4 XmlEvGetAttrDeclCount( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(ub4)
number of attributes
Retrieves the element name in attribute declaration XML_EVENT_ATTLIST_DECLARATION
. Also, provides the length as an OUT len
parameter.
Syntax
oratext *XmlEvGetAttrDeclElName( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
Returns
(oratext*)
the element name
Retrieves the NULL
-terminated element name in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
Syntax
oratext *XmlEvGetAttrDeclElName0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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.
Syntax
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 |
Returns
(oratext*)
the local name
Retrieves the NULL
-terminated local name in attribute declaration event, XML_EVENT_ATTLIST_DECLARATION
.
Syntax
oratext *XmlEvGetAttrDeclLocalName0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
Returns
(oratext*)
the local name
Retrieves the attribute name in attribute declaration XML_EVENT_ATTLIST_DECLARATION
. Also, provides the length as an OUT len
parameter.
Syntax
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 |
Returns
(oratext*)
the attribute name
Retrieves the NULL
-terminated attribute name in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
Syntax
oratext *XmlEvGetAttrDeclName0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
Returns
(oratext*)
the attribute name
Retrieves the attribute prefix in attribute declaration XML_EVENT_ATTLIST_DECLARATION
. Also, provides the length as an OUT len
parameter.
Syntax
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 |
Returns
(oratext*)
the attribute prefix
Retrieves the NULL
-terminated attribute prefix in attribute declaration XML_EVENT_ATTLIST_DECLARATION
.
Syntax
oratext *XmlEvGetAttrDeclPrefix0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
Returns
(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
.
Syntax
sb8 XmlEvGetAttrID( xmlevctx *evctx ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of attribute |
Returns
(sb8)
the ID
Retrieves the attribute local name for the XML_EVENT_START_ELEMENT
events. Also, provides the length as an OUT len
parameter.
Syntax
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 |
Returns
(oratext*)
the attribute name
Retrieves the NULL
-terminated attribute local name for the XML_EVENT_START_ELEMENT
events.
Syntax
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 |
Returns
(oratext*)
the attribute name
Retrieves the attribute name for the XML_EVENT_START_ELEMENT
events. Also, provides the length as an OUT len
parameter.
Syntax
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 |
Returns
(oratext*)
the attribute name
Retrieves the NULL
-terminated attribute name for the XML_EVENT_START_ELEMENT
events.
Syntax
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 |
Returns
(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.
Syntax
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 |
Returns
(oratext*)
the attribute prefix
Retrieves the NULL
-terminated attribute prefix for the XML_EVENT_START_ELEMENT
events.
Syntax
oratext *XmlEvGetAttrPrefix0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
Returns
(oratext*)
the attribute prefix
Retrieves the attribute URI for the XML_EVENT_START_ELEMENT
events. Also, provides the length as an OUT len
parameter.
Syntax
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 |
Returns
(oratext*)
the attribute URI
Retrieves the NULL
-terminated attribute URI for the XML_EVENT_START_ELEMENT
events.
Syntax
oratext *XmlEvGetAttrURI0( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
Returns
(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
.
Syntax
sb8 XmlEvGetAttrUriID( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of attribute |
Returns
(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.
Syntax
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 |
Returns
(oratext*)
the attribute value
Retrieves the NULL
-terminated attribute value for the XML_EVENT_START_ELEMENT
events.
Syntax
oratext *XmlEvGetAttrValue0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
Returns
(oratext*)
the attribute value
Retrieves the element declaration content for XML_EVENT_ELEMENT_DECLARATION
. Also, provides the length as an OUT len
parameter.
Syntax
oratext *XmlEvGetElDeclContent( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
Returns
(oratext*)
the declaration content
Retrieves the element declaration content for XML_EVENT_ELEMENT_DECLARATION
.
Syntax
oratext *XmlEvGetElDeclContent0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(oratext*)
the declaration content
Returns the value of the encoding specified in either XmlEvCreatePPCtx() call or XmlEvCreateSVCtx() call.
Syntax
oratext *XmlEvGetEncoding( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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.
Syntax
xmlerr XmlEvGetError( xmlevctx *evctx oratext **message);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
message |
IN |
the error message |
Returns
(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
Syntax
oratext *XmlEvGetName( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the name |
Returns
(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
Syntax
oratext *XmlEventGetName0( xmleventctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
Syntax
oratext *XmlEvGetLocalName( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
Returns
(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
Syntax
oratext *XmlEvGetLocalName0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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.
Syntax
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
Syntax
oratext *XmlEvGetPIData( xmlevctx *evctx ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
Returns
(oratext*)
data
Retrieves the NULL
-terminated data for one of the following events:
XML_EVENT_PI
XML_EVENT_PI_CONT
Syntax
oratext *XmlEvGetPIData0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
Syntax
oratext *XmlEvGetPITarget( xmlevctx *evctx ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
Returns
(oratext*)
target
Retrieves the NULL
-terminated target for one of the following events:
XML_EVENT_PI
XML_EVENT_PI_CONT
Syntax
oratext *XmlEvGetPITarget0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(oratext*)
target
Determines if the general entity was declared, XML_EVENT_PE_DECLARATION
.
Syntax
boolean XmlEvGetPEIsGen( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
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.
Syntax
oratext *XmlEvGetPERepl( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
Returns
(oratext*)
PE replacement text
Retrieves the NULL
-terminated replacement text of PE declaration, XML_EVENT_PE_DECLARATION
.
Syntax
oratext *XmlEvGetPERepl0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
Syntax
oratext *XmlEvGetPrefix( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the prefix |
Returns
(oratext*)
the prefix tag
Retrieves the NULL
-terminated prefix tag for one of the following events:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
Syntax
oratext *XmlEvGetPrefix0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
Syntax
oratext *XmlEvGetPubId( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
Returns
(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
Syntax
oratext *XmlEvGetPubId0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returnsb
(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
Syntax
oratext *XmlEvGetSysId( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
the length |
Returns
(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
Syntax
oratext *XmlEvGetSysId0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
.
Syntax
sb8 XmlEvGetTagID( xmlevctx *evctx)
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
.
Syntax
sb8 XmlEvGetTagUriID( xmlevctx *evctx)
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
Syntax
oratext *XmlEvGetText( xmlevctx *evctx ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
Returns
(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
Syntax
oratext *XmlEvGetText0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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.
Syntax
oratext *XmlEvGetUENdata( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
Returns
(oratext*)
ndata
Retrieves the NULL
-terminated ndata for XML_EVENT_UE_DECLARATION
event.
Syntax
oratext *XmlEvGetUENdata0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
Syntax
oratext *XmlEvGetURI( xmlevctx *evctx, ub4 *len);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
len |
OUT |
length of the event name |
Returns
(oratext*)
URI tag
Retrieves the NULL
-terminated URI tag for one of the following events:
XML_EVENT_START_ELEMENT
XML_EVENT_END_ELEMENT
Syntax
oratext *XmlEvGetURI0( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(oratext*)
URI tag
Provides information about version specification in XML declaration for the XML_EVENT_START_DOCUMENT
event.
Syntax
oratext *XmlEvGetVersion( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(oratext*)
version string from the XML declaration.
Provides information about encoding specification in XML declaration for the XML_EVENT_START_DOCUMENT
event.
Syntax
boolean XmlEvIsEncodingSpecified( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
TRUE
if encoding was specified in XML declaration, FALSE
otherwise
Determines if an attribute is a namespace atrribute for XML_EVENT_START_ELEMENT
event.
Syntax
boolean XmlEvIsNamespaceAttr( xmlevctx *evctx, ub4 index);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
index |
IN |
index of the attribute |
Returns
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.
Syntax
sword XmlEvIsStandalone( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Events contextt |
Returns
(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.
Syntax
xmlevtype XmlEvNext( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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
.
Syntax
xmlevtype XmlEvNextTag( xmlevctx *evctx);
Parameter | In/Out | Description |
---|---|---|
evctx |
IN |
XML Event context |
Returns
(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 10, "Package XML APIs for C". The actual parsing is driven by multiple calls to XmlEvNext().
Syntax
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 |
Returns
(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().
Syntax
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 |
Returns
(xmlerr)
the error code