Skip Headers
Oracle® Database XML C API Reference
11g Release 2 (11.2)

Part Number E10770-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
CAXML02000

4 Package Event APIs for C

This chapter contains the following sections:

See Also:

CAXML5575

Event Interface

Table 4-1 summarizes the methods available through the Event interface.

CAXML5576Table 4-1 Summary of Event Methods

Function Summary

XmlEvCleanPPCtx()

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.

XmlEvCreatePPCtx()

Creates an Event context in pull-parse mode.

XmlEvCreateSVCtx()

Creates an event context for the streaming validadtor.

XmlEvDestroyPPCtx()

Destroys the event context. Terminates parsing. May be called at any time during a parsing operation.

XmlEvDestroySVCtx()

Terminates an event context created by a streaming validator.

XmlEvGetAttrCount()

Retrieves the number of attributes for the XML_EVENT_START_ELEMENT event.

XmlEvGetAttrDeclBody()

Retrieves the attribute body in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

XmlEvGetAttrDeclBody0()

Retrieves the NULL-terminated attribute body in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

XmlEvGetAttrDeclCount()

Retreives the number of attributes in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

XmlEvGetAttrDeclElName()

Retrieves the element name in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

XmlEvGetAttrDeclElName0()

Retrieves the NULL-terminated element name in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

XmlEvGetAttrDeclLocalName()

Retrieves the local name in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

XmlEvGetAttrDeclLocalName0()

Retrieves the NULL-terminated local name in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

XmlEvGetAttrDeclName()

Retrieves the attribute name in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

XmlEvGetAttrDeclName0()

Retrieves the NULL-terminated attribute name in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

XmlEvGetAttrDeclPrefix()

Retrieves the attribute prefix in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

XmlEvGetAttrDeclPrefix0()

Retrieves the NULL-terminated attribute prefix in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

XmlEvGetAttrID()

Retrieves the ID for the attribute's QNAME, for XML_EVENT_START_ELEMENT events.

XmlEvGetAttrLocalName()

Retrieves the attribute local name for the XML_EVENT_START_ELEMENT events. Also, provides the length as an OUT len parameter.

XmlEvGetAttrLocalName0()

Retrieves the NULL-terminated attribute name for the XML_EVENT_START_ELEMENT events.

XmlEvGetAttrName()

Retrieves the attribute name for the XML_EVENT_START_ELEMENT events. Also, provides the length as an OUT len parameter.

XmlEvGetAttrName0()

Retrieves the NULL-terminated attribute name for the XML_EVENT_START_ELEMENT events.

XmlEvGetAttrPrefix()

Retrieves the prefix tag for XML_EVENT_START_ELEMENT events, and also returns the length of the event as an OUT len parameter.

XmlEvGetAttrPrefix0()

Retrieves the NULL-terminated attribute prefix for the XML_EVENT_START_ELEMENT events.

XmlEvGetAttrURI()

Retrieves the attribute URI for the XML_EVENT_START_ELEMENT events. Also, provides the length as an OUT len parameter.

XmlEvGetAttrURI0()

Retrieves the NULL-terminated attribute URI for the XML_EVENT_START_ELEMENT events.

XmlEvGetAttrUriID()

Retrieves the ID for the attribute's URI, for XML_EVENT_START_ELEMENT events.

XmlEvGetAttrValue()

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.

XmlEvGetAttrValue0()

Retrieves the NULL-terminated attribute value for the XML_EVENT_START_ELEMENT events.

XmlEvGetElDeclContent()

Retrieves the element declaration content for XML_EVENT_ELEMENT_DECLARATION. Also, provides the length as an OUT len parameter.

XmlEvGetElDeclContent0()

Retrieves the element declaration content for XML_EVENT_ELEMENT_DECLARATION.

XmlEvGetEncoding()

Returns the value of the encoding specified.

XmlEvGetError()

Retrieves the error number when the XML_EVENT_FATAL_ERROR or XML_EVENT_ERROR event is returned by an XmlEvNext()

XmlEvGetName()

Retrurns the name of for either XML_EVENT_START_ELEMENT or XML_EVENT_END_ELEMENT events, and the length of the event in the OUT len parameter.

XmlEvGetName0()

Retrieves a NULL-terminated name for either XML_EVENT_START_ELEMENT or XML_EVENT_END_ELEMENT events

XmlEvGetLocalName()

Retrieves the local name tag for either XML_EVENT_START_ELEMENT or XML_EVENT_END_ELEMENT events, and also returns the length of the event as an OUT len parameter:

XmlEvGetLocalName0()

Retrieves a NULL-terminated local name tag for either XML_EVENT_START_ELEMENT or XML_EVENT_END_ELEMENT events, and also returns the length of the event as an OUT len parameter:

XmlEvGetLocation()

Retrieves the location during parsing, as OUT parameters for the line number of the input stream and its path.

XmlEvGetPIData()

Retrieves the text for XML_EVENT_PI or XML_EVENT_PI_CONT events, and also returns the length of the event as an OUT len parameter.

XmlEvGetPIData0()

Retrieves NULL-terminated text for XML_EVENT_PI or XML_EVENT_PI_CONT events.

XmlEvGetPITarget()

Retrieves the target for XML_EVENT_PI and XML_EVENT_PI_CONT events, and also returns the length of the event as an OUT len parameter.

XmlEvGetPITarget0()

Retrieves the NULL-terminated target for XML_EVENT_PI and XML_EVENT_PI_CONT events.

XmlEvGetPEIsGen()

Determines if the general entity was declared, XML_EVENT_PE_DECLARATION.

XmlEvGetPERepl()

Retrieves the replacement text of PE declaration, XML_EVENT_PE_DECLARATION. Also, provides the length as an OUT len parameter.

XmlEvGetPERepl0()

Retrieves the NULL-terminated replacement text of PE declaration, XML_EVENT_PE_DECLARATION.

XmlEvGetPrefix()

Retrieves the prefix tag for one of either XML_EVENT_START_ELEMENT or XML_EVENT_END_ELEMENT events, and also returns the length of the event as an OUT len parameter.

XmlEvGetPrefix0()

Retrieves the prefix tag for one of either XML_EVENT_START_ELEMENT or XML_EVENT_END_ELEMENT events..

XmlEvGetPubId()

Retrieves the public id for XML_EVENT_PE_DECLARATION, XML_EVENT_UE_DECLARATION, or XML_EVENT_NOTATION_DECLARATION events; also, provides the length as an OUT len parameter.

XmlEvGetPubId0()

Retrieves the NULL-terminated public id for XML_EVENT_PE_DECLARATION, XML_EVENT_UE_DECLARATION, or XML_EVENT_NOTATION_DECLARATION events.

XmlEvGetSysId()

Retrieves the system id for XML_EVENT_PE_DECLARATION, XML_EVENT_UE_DECLARATION, or XML_EVENT_NOTATION_DECLARATION events; also, provides the length as an OUT len parameter.

XmlEvGetSysId0()

Retrieves the NULL-terminated system id for XML_EVENT_PE_DECLARATION, XML_EVENT_UE_DECLARATION, or XML_EVENT_NOTATION_DECLARATION events.

XmlEvGetTagID()

Retrieves the ID for the tag's QNAME, for XML_EVENT_START_ELEMENT events.

XmlEvGetTagUriID()

Retrieves the ID for the tag's URI, for XML_EVENT_START_ELEMENT and XML_EVENT_END_ELEMENT events.

XmlEvGetText()

Retrieves the text for XML_EVENT_CHARACTERS, XML_EVENT_CHARACTERS_CONT, XML_EVENT_SPACE, XML_EVENT_SPACE_CONT, XML_EVENT_COMMENT, XML_EVENT_COMMENT_CONT, XML_EVENT_CDATA, and XML_EVENT_CDATA_CONT events, and also returns the length of the event as an OUT len parameter.

XmlEvGetText0()

Retrieves the NULL-terminated text for XML_EVENT_CHARACTERS, XML_EVENT_CHARACTERS_CONT, XML_EVENT_SPACE, XML_EVENT_SPACE_CONT, XML_EVENT_COMMENT, XML_EVENT_COMMENT_CONT, XML_EVENT_CDATA, and XML_EVENT_CDATA_CONT events.

XmlEvGetUENdata()

Retrieves the ndata for XML_EVENT_UE_DECLARATION event, and also returns the length of the event as an OUT len parameter.

XmlEvGetUENdata0()

Retrieves the NULL-terminated ndata for XML_EVENT_UE_DECLARATION event.

XmlEvGetURI()

Retrieves the URI tag for XML_EVENT_START_ELEMENT or XML_EVENT_END_ELEMENT events, and also returns the length of the event as an OUT len parameter:

XmlEvGetURI0()

Retrieves the NULL-terminated URI tag for XML_EVENT_START_ELEMENT or XML_EVENT_END_ELEMENT events.

XmlEvGetVersion()

Provides information about version specification in XML declaration for the XML_EVENT_START_DOCUMENT event.

XmlEvIsEncodingSpecified()

Provides information about encoding specification in XML declaration for the XML_EVENT_START_DOCUMENT event.

XmlEvIsNamespaceAttr()

Determines if an attribute is a namespace atrribute for XML_EVENT_START_ELEMENT event.

XmlEvIsStandalone()

Provides information about standalone specification in XML declaration for the XML_EVENT_START_DOCUMENT event

XmlEvNext()

Gets the next event and advances the parser.

XmlEvNextTag()

Advances the parser to the next tag event.

XmlEvLoadPPDoc()

Loads a new document and configures it for pull parsing.

XmlEvSchemaValidate()

Validates XML documents represented by events.


CAXML5577

XmlEvCleanPPCtx()

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.

CAXML5578Syntax

xmlerr XmlEvCleanPPCtx(
   xmlctx *xctx,
   xmlevctx *evctx);
Parameter In/Out Description
xctx
IN
XML context
evtx
IN
XmlEvents context

CAXML5579Returns

(xmlerr) the error number

CAXML5580

XmlEvCreatePPCtx()

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 XmlEvGetXXX() functions. Basic set of properties are the same as for XmlLoadDom. Input source should be specified with XmlEvLoadPPDoc() call.

CAXML5581Syntax

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:
  • ("expand_entities", boolean) that, when FALSE, causes parsed non-parameter entity references not be expanded. By default such references are expanded.

  • ("use_buffer", buffer) is the address of a buffer that when specified, will use the buffer to collect data that should be returned back to the user. The getXXX() functions will return this buffer as a data pointer.

  • ("use_buffer_len", lengthOfBuffer) is the number of bytes in a buffer, the actual lenght of the buffer, and no more than the specified length is collected. In the case, only part of the data is collected, generating the CONT flavor of the event is generated. Subsequent calls to XmlEventsNext provide additional data. Sequence of CONT-flavored events is always terminated by a non -CONT event. The buffer may be only partially filled.

  • ("get_id_callback", function) is the addres for the callback function, to convert text base names to 8-byte IDs. Once such function is supplied, the user is allowed to use XmlEvGetTagID, XmlEvGetAttrID, XmlEvGetTagUriID, and XmlEvGetAttrUriID.

  • ("raw_buffer_len", length) is the number of bytes in a buffer. By default, this parameter is 256K. Raw buffer is used to read the input data and perform character conversion, and also to convert CRLFs and CRs to LFs.

  • ("error_callback", callback) provides the address of a callback function tha is invoked to signal illegal use of an API for that event.

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) );

CAXML5582Returns

(xmlevctx) Event contex to be passed on subsequent calls to XmlEvNext()

CAXML5583

XmlEvCreateSVCtx()

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().

CAXML5584Syntax

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

CAXML5585Returns

(xmlevctx) Event contex to be passed on subsequent calls to XmlEvNext()

CAXML5586

XmlEvDestroyPPCtx()

Destroys the event context. Terminates parsing. May be called at any time during a parsing operation.

CAXML5587Syntax

void XmlEvDestroyPPCtx(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5588

XmlEvDestroySVCtx()

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().

CAXML5589Syntax

xmlerr XmlEvDestroySVCtx(
   xmlctx *xctx, 
   xmlevctx *evCtx);
Parameter In/Out Description
xctx
IN
XML context
evCtx
IN
Event context that should be terminatedt

CAXML5590Returns

(xmlerr) the error number

CAXML5591

XmlEvGetAttrCount()

Retrieves the number of attributes for the XML_EVENT_START_ELEMENT event.

CAXML5592Syntax

ub4  XmlEvGetAttrCount(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5593Returns

(ub4) the number of attributes

CAXML5594

XmlEvGetAttrDeclBody()

Retrieves the attribute body in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

CAXML5595Syntax

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

CAXML5596Returns

(oratext*) the declaration body

CAXML5597

XmlEvGetAttrDeclBody0()

Retrieves the NULL-terminated attribute body in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

CAXML5598Syntax

oratext *XmlEvGetAttrDeclBody0(
   xmlevctx *evctx,
   ub4 index);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of the attribute

CAXML5599Returns

(oratext*) the declaration body

CAXML5600

XmlEvGetAttrDeclCount()

Retreives the number of attributes in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

CAXML5601Syntax

ub4 XmlEvGetAttrDeclCount(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5602Returns

(ub4) number of attributes

CAXML5603

XmlEvGetAttrDeclElName()

Retrieves the element name in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

CAXML5604Syntax

oratext *XmlEvGetAttrDeclElName(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
the length

CAXML5605Returns

(oratext*) the element name

CAXML5606

XmlEvGetAttrDeclElName0()

Retrieves the NULL-terminated element name in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

CAXML5607Syntax

oratext *XmlEvGetAttrDeclElName0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5608Returns

(oratext*) the element name

CAXML5609

XmlEvGetAttrDeclLocalName()

Retrieves the local name of the attribute declaration event, XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

CAXML5610Syntax

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

CAXML5611Returns

(oratext*) the local name

CAXML5612

XmlEvGetAttrDeclLocalName0()

Retrieves the NULL-terminated local name in attribute declaration event, XML_EVENT_ATTLIST_DECLARATION.

CAXML5613Syntax

oratext *XmlEvGetAttrDeclLocalName0(
   xmlevctx *evctx,
   ub4 index);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of the attribute

CAXML5614Returns

(oratext*) the local name

CAXML5615

XmlEvGetAttrDeclName()

Retrieves the attribute name in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

CAXML5616Syntax

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

CAXML5617Returns

(oratext*) the attribute name

CAXML5618

XmlEvGetAttrDeclName0()

Retrieves the NULL-terminated attribute name in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

CAXML5619Syntax

oratext *XmlEvGetAttrDeclName0(
   xmlevctx *evctx,
   ub4 index);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of the attribute

CAXML5620Returns

(oratext*) the attribute name

CAXML5621

XmlEvGetAttrDeclPrefix()

Retrieves the attribute prefix in attribute declaration XML_EVENT_ATTLIST_DECLARATION. Also, provides the length as an OUT len parameter.

CAXML5622Syntax

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

CAXML5623Returns

(oratext*) the attribute prefix

CAXML5624

XmlEvGetAttrDeclPrefix0()

Retrieves the NULL-terminated attribute prefix in attribute declaration XML_EVENT_ATTLIST_DECLARATION.

CAXML5625Syntax

oratext *XmlEvGetAttrDeclPrefix0(
   xmlevctx *evctx,
   ub4 index);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of the attribute

CAXML5626Returns

(oratext*) the attribute prefix

CAXML5627

XmlEvGetAttrID()

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.

CAXML5628Syntax

sb8 XmlEvGetAttrID(
   xmlevctx *evctx
   ub4 index);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of attribute

CAXML5629Returns

(sb8) the ID

CAXML5630

XmlEvGetAttrLocalName()

Retrieves the attribute local name for the XML_EVENT_START_ELEMENT events. Also, provides the length as an OUT len parameter.

CAXML5631Syntax

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

CAXML5632Returns

(oratext*) the attribute name

CAXML5633

XmlEvGetAttrLocalName0()

Retrieves the NULL-terminated attribute local name for the XML_EVENT_START_ELEMENT events.

CAXML5634Syntax

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

CAXML5635Returns

(oratext*) the attribute name

CAXML5636

XmlEvGetAttrName()

Retrieves the attribute name for the XML_EVENT_START_ELEMENT events. Also, provides the length as an OUT len parameter.

CAXML5637Syntax

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

CAXML5638Returns

(oratext*) the attribute name

CAXML5639

XmlEvGetAttrName0()

Retrieves the NULL-terminated attribute name for the XML_EVENT_START_ELEMENT events.

CAXML5640Syntax

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

CAXML5641Returns

(oratext*) the attribute name

CAXML5642

XmlEvGetAttrPrefix()

Retrieves the prefix tag for XML_EVENT_START_ELEMENT events, and also returns the length of the event as an OUT len parameter.

CAXML5643Syntax

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

CAXML5644Returns

(oratext*) the attribute prefix

CAXML5645

XmlEvGetAttrPrefix0()

Retrieves the NULL-terminated attribute prefix for the XML_EVENT_START_ELEMENT events.

CAXML5646Syntax

oratext *XmlEvGetAttrPrefix0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of the attribute

CAXML5647Returns

(oratext*) the attribute prefix

CAXML5648

XmlEvGetAttrURI()

Retrieves the attribute URI for the XML_EVENT_START_ELEMENT events. Also, provides the length as an OUT len parameter.

CAXML5649Syntax

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

CAXML5650Returns

(oratext*) the attribute URI

CAXML5651

XmlEvGetAttrURI0()

Retrieves the NULL-terminated attribute URI for the XML_EVENT_START_ELEMENT events.

CAXML5652Syntax

oratext *XmlEvGetAttrURI0(
   xmlevctx *evctx,
   ub4 index);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of the attribute

CAXML5653Returns

(oratext*) the attribute URI

CAXML5654

XmlEvGetAttrUriID()

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.

CAXML5655Syntax

sb8 XmlEvGetAttrUriID(
   xmlevctx *evctx,
   ub4 index);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of attribute

CAXML5656Returns

(sb8) the ID

CAXML5657

XmlEvGetAttrValue()

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.

CAXML5658Syntax

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

CAXML5659Returns

(oratext*) the attribute value

CAXML5660

XmlEvGetAttrValue0()

Retrieves the NULL-terminated attribute value for the XML_EVENT_START_ELEMENT events.

CAXML5661Syntax

oratext *XmlEvGetAttrValue0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of the attribute

CAXML5662Returns

(oratext*) the attribute value

CAXML5663

XmlEvGetElDeclContent()

Retrieves the element declaration content for XML_EVENT_ELEMENT_DECLARATION. Also, provides the length as an OUT len parameter.

CAXML5664Syntax

oratext *XmlEvGetElDeclContent(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
the length

CAXML5665Returns

(oratext*) the declaration content

CAXML5666

XmlEvGetElDeclContent0()

Retrieves the element declaration content for XML_EVENT_ELEMENT_DECLARATION.

CAXML5667Syntax

oratext *XmlEvGetElDeclContent0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5668Returns

(oratext*) the declaration content

CAXML5669

XmlEvGetEncoding()

Returns the value of the encoding specified in either XmlEvCreatePPCtx() call or XmlEvCreateSVCtx() call.

CAXML5670Syntax

oratext *XmlEvGetEncoding(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5671Returns

(oratext*) the encoding value in out-encoding; NULL if no encoding is specified

CAXML5672

XmlEvGetError()

Retrieves the error number when the XML_EVENT_FATAL_ERROR or XML_EVENT_ERROR event is returned by a XmlEvNext() call.

CAXML5673Syntax

xmlerr XmlEvGetError(
   xmlevctx *evctx
   oratext **message);
Parameter In/Out Description
evctx
IN
XML Event context
message
IN
the error message

CAXML5674Returns

(xmlerr) the error number

CAXML5675

XmlEvGetName()

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:

CAXML5676Syntax

oratext *XmlEvGetName(
   xmlevctx *evctx, 
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
length of the name

CAXML5677Returns

(oratext*) The name

CAXML5678

XmlEvGetName0()

Retrieves a NULL-terminated name for one of the following events:

CAXML5679Syntax

oratext *XmlEventGetName0(
   xmleventctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5680Returns

(oratext*) The name

CAXML5681

XmlEvGetLocalName()

Retrieves the local name tag for one of the following events, and also returns the length of the event as an OUT len parameter:

CAXML5682Syntax

oratext *XmlEvGetLocalName(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
length of the event name

CAXML5683Returns

(oratext*) local name tag

CAXML5684

XmlEvGetLocalName0()

Retrieves the NULL-terminated local name tag for one of the following events:

CAXML5685Syntax

oratext *XmlEvGetLocalName0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5686Returns

(oratext*) local name tag

CAXML5687

XmlEvGetLocation()

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.

CAXML5688Syntax

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

CAXML5689

XmlEvGetPIData()

Retrieves the text for one of the following events, and also returns the length of the event as an OUT len parameter:

CAXML5690Syntax

oratext *XmlEvGetPIData(
   xmlevctx *evctx
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
length of the event name

CAXML5691Returns

(oratext*) data

CAXML5692

XmlEvGetPIData0()

Retrieves the NULL-terminated data for one of the following events:

CAXML5693Syntax

oratext *XmlEvGetPIData0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5694Returns

(oratext*) data

CAXML5695

XmlEvGetPITarget()

Retrieves the target for one of the following events, and also returns the length of the event as an OUT len parameter:

CAXML5696Syntax

oratext *XmlEvGetPITarget(
   xmlevctx *evctx
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
length of the event name

CAXML5697Returns

(oratext*) target

CAXML5698

XmlEvGetPITarget0()

Retrieves the NULL-terminated target for one of the following events:

CAXML5699Syntax

oratext *XmlEvGetPITarget0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5700Returns

(oratext*) target

CAXML5701

XmlEvGetPEIsGen()

Determines if the general entity was declared, XML_EVENT_PE_DECLARATION.

CAXML5702Syntax

boolean XmlEvGetPEIsGen(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5703Returns

TRUE for a general entity, FALSE if a parameter

CAXML5704

XmlEvGetPERepl()

Retrieves the replacement text of PE declaration, XML_EVENT_PE_DECLARATION. Also, provides the length as an OUT len parameter.

CAXML5705Syntax

oratext *XmlEvGetPERepl(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
the length

CAXML5706Returns

(oratext*) PE replacement text

CAXML5707

XmlEvGetPERepl0()

Retrieves the NULL-terminated replacement text of PE declaration, XML_EVENT_PE_DECLARATION.

CAXML5708Syntax

oratext *XmlEvGetPERepl0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5709Returns

(oratext*) PE replacement text

CAXML5710

XmlEvGetPrefix()

Retrieves the prefix tag for one of the following events, and also returns the length of the event as an OUT len parameter:

CAXML5711Syntax

oratext *XmlEvGetPrefix(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
length of the prefix

CAXML5712Returns

(oratext*) the prefix tag

CAXML5713

XmlEvGetPrefix0()

Retrieves the NULL-terminated prefix tag for one of the following events:

CAXML5714Syntax

oratext *XmlEvGetPrefix0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5715Returns

(oratext*) the prefix tag

CAXML5716

XmlEvGetPubId()

Retrieves the public id for one of the following events; also, provides the length as an OUT len parameter:

CAXML5717Syntax

oratext *XmlEvGetPubId(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
the length

CAXML5718Returns

(oratext*) public id

CAXML5719

XmlEvGetPubId0()

Retrieves the NULL-terminated public id for one of the following events:

CAXML5720Syntax

oratext *XmlEvGetPubId0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5721Returnsb

(oratext*) public id

CAXML5722

XmlEvGetSysId()

Retrieves the system id for one of the following events; also, provides the length as an OUT len parameter:

CAXML5723Syntax

oratext *XmlEvGetSysId(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
the length

CAXML5724Returns

(oratext*) system id

CAXML5725

XmlEvGetSysId0()

Retrieves the NULL-terminated system id for one of the following events:

CAXML5726Syntax

oratext *XmlEvGetSysId0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5727Returns

(oratext*) system id

CAXML5728

XmlEvGetTagID()

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.

CAXML5729Syntax

sb8 XmlEvGetTagID(
   xmlevctx *evctx)
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5730Returns

(sb8) the ID

CAXML5731

XmlEvGetTagUriID()

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.

CAXML5732Syntax

sb8 XmlEvGetTagUriID(
   xmlevctx *evctx)
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5733Returns

(sb8) the ID

CAXML5734

XmlEvGetText()

Retrieves the text for one of the following events, and also returns the length of the event as an OUT len parameter:

CAXML5735Syntax

oratext *XmlEvGetText(
   xmlevctx *evctx
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
length of the event name

CAXML5736Returns

(oratext*) event text

CAXML5737

XmlEvGetText0()

Retrieves the NULL-terminated text for one of the following events:

CAXML5738Syntax

oratext *XmlEvGetText0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5739Returns

(oratext*) event text

CAXML5740

XmlEvGetUENdata()

Retrieves the ndata for XML_EVENT_UE_DECLARATION event, and also returns the length of the event as an OUT len parameter.

CAXML5741Syntax

oratext *XmlEvGetUENdata(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
length of the event name

CAXML5742Returns

(oratext*) ndata

CAXML5743

XmlEvGetUENdata0()

Retrieves the NULL-terminated ndata for XML_EVENT_UE_DECLARATION event.

CAXML5744Syntax

oratext *XmlEvGetUENdata0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5745Returns

(oratext*) ndata

CAXML5746

XmlEvGetURI()

Retrieves the URI tag for one of the following events, and also returns the length of the event as an OUT len parameter:

CAXML5747Syntax

oratext *XmlEvGetURI(
   xmlevctx *evctx,
   ub4 *len);
Parameter In/Out Description
evctx
IN
XML Event context
len
OUT
length of the event name

CAXML5748Returns

(oratext*) URI tag

CAXML5749

XmlEvGetURI0()

Retrieves the NULL-terminated URI tag for one of the following events:

CAXML5750Syntax

oratext *XmlEvGetURI0(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5751Returns

(oratext*) URI tag

CAXML5752

XmlEvGetVersion()

Provides information about version specification in XML declaration for the XML_EVENT_START_DOCUMENT event.

CAXML5753Syntax

oratext *XmlEvGetVersion(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5754Returns

(oratext*) version string from the XML declaration.

CAXML5755

XmlEvIsEncodingSpecified()

Provides information about encoding specification in XML declaration for the XML_EVENT_START_DOCUMENT event.

CAXML5756Syntax

boolean XmlEvIsEncodingSpecified(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5757Returns

TRUE if encoding was specified in XML declaration, FALSE otherwise

CAXML5758

XmlEvIsNamespaceAttr()

Determines if an attribute is a namespace atrribute for XML_EVENT_START_ELEMENT event.

CAXML5759Syntax

boolean XmlEvIsNamespaceAttr(
   xmlevctx *evctx,
   ub4 index);
Parameter In/Out Description
evctx
IN
XML Event context
index
IN
index of the attribute

CAXML5760Returns

TRUE if an attribute is a namespace attribute, FALSE otherwise

CAXML5761

XmlEvIsStandalone()

Provides information about standalone specification in XML declaration for the XML_EVENT_START_DOCUMENT event.

CAXML5762Syntax

sword  XmlEvIsStandalone(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Events contextt

CAXML5763Returns

(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

CAXML5764

XmlEvNext()

Gets the next event; advances the parser.

CAXML5765Syntax

xmlevtype XmlEvNext(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5766Returns

(xmlevtype) the event

CAXML5767

XmlEvNextTag()

Advances the parser to the next tag event, such as XML_EVENT_START_ELEMENT, XML_EVENT_END_ELEMENT, and XML_EVENT_END_DOCUMENT.

CAXML5768Syntax

xmlevtype XmlEvNextTag(
   xmlevctx *evctx);
Parameter In/Out Description
evctx
IN
XML Event context

CAXML5769Returns

(xmlevtype) the event

CAXML5770

XmlEvLoadPPDoc()

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().

CAXML5771Syntax

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

CAXML5772Returns

(xmlerr) the error code

CAXML5773

XmlEvSchemaValidate()

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().

CAXML5774Syntax

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

CAXML5775Returns

(xmlerr) the error code

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

  • Event Interface
    • XmlEvCleanPPCtx()
    • XmlEvCreatePPCtx()
    • XmlEvCreateSVCtx()
    • XmlEvDestroyPPCtx()
    • XmlEvDestroySVCtx()
    • XmlEvGetAttrCount()
    • XmlEvGetAttrDeclBody()
    • XmlEvGetAttrDeclBody0()
    • XmlEvGetAttrDeclCount()
    • XmlEvGetAttrDeclElName()
    • XmlEvGetAttrDeclElName0()
    • XmlEvGetAttrDeclLocalName()
    • XmlEvGetAttrDeclLocalName0()
    • XmlEvGetAttrDeclName()
    • XmlEvGetAttrDeclName0()
    • XmlEvGetAttrDeclPrefix()
    • XmlEvGetAttrDeclPrefix0()
    • XmlEvGetAttrID()
    • XmlEvGetAttrLocalName()
    • XmlEvGetAttrLocalName0()
    • XmlEvGetAttrName()
    • XmlEvGetAttrName0()
    • XmlEvGetAttrPrefix()
    • XmlEvGetAttrPrefix0()
    • XmlEvGetAttrURI()
    • XmlEvGetAttrURI0()
    • XmlEvGetAttrUriID()
    • XmlEvGetAttrValue()
    • XmlEvGetAttrValue0()
    • XmlEvGetElDeclContent()
    • XmlEvGetElDeclContent0()
    • XmlEvGetEncoding()
    • XmlEvGetError()
    • XmlEvGetName()
    • XmlEvGetName0()
    • XmlEvGetLocalName()
    • XmlEvGetLocalName0()
    • XmlEvGetLocation()
    • XmlEvGetPIData()
    • XmlEvGetPIData0()
    • XmlEvGetPITarget()
    • XmlEvGetPITarget0()
    • XmlEvGetPEIsGen()
    • XmlEvGetPERepl()
    • XmlEvGetPERepl0()
    • XmlEvGetPrefix()
    • XmlEvGetPrefix0()
    • XmlEvGetPubId()
    • XmlEvGetPubId0()
    • XmlEvGetSysId()
    • XmlEvGetSysId0()
    • XmlEvGetTagID()
    • XmlEvGetTagUriID()
    • XmlEvGetText()
    • XmlEvGetText0()
    • XmlEvGetUENdata()
    • XmlEvGetUENdata0()
    • XmlEvGetURI()
    • XmlEvGetURI0()
    • XmlEvGetVersion()
    • XmlEvIsEncodingSpecified()
    • XmlEvIsNamespaceAttr()
    • XmlEvIsStandalone()
    • XmlEvNext()
    • XmlEvNextTag()
    • XmlEvLoadPPDoc()
    • XmlEvSchemaValidate()

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF