Oracle9i XML API Reference - XDK and Oracle XML DB Release 2 (9.2) Part Number A96616-01 |
|
This chapter describes the following sections:
This C implementation of the XML processor (or parser) follows the W3C XML specification (rev REC-xml-19980210) and implements the required behavior of an XML processor in terms of how it must read XML data and the information it must provide to the application.
Parsing a single document:
xmlinit, xmlparsexxx, xmlterm
Parsing multiple documents, but only the latest document's data needs to be available:
xmlinit, xmlparsexxx, xmlclean, xmlparsexxx, xmlclean ... xmlterm
Parsing multiple documents, all document data must be available:
xmlinit, xmlparsexxx, xmlparsexxx ... xmlterm
Memory callback functions may be used if you wish to use your own memory allocation. If they are used, both functions should be specified.
The memory allocated for parameters passed to the SAX callbacks or for nodes and data stored with the DOM parse tree will not be freed until one of the following is done:
If threads are forked off somewhere in the midst of the init-parse-terminate sequence of calls, you will get unpredictable behavior and results.
Frees an allocated list of element nodes. Used primarily to free the lists created by getElementsByTagName()
.
void freeElements( xmlctx *ctx, xmlnodes *list);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context. |
list |
(IN) |
List of nodes to free |
This function returns the IANA/Mime name of the DOM/SAX data encoding, such as "ASCII
", "ISO-8859-1
", "UTF-8
", "UTF-16
", and so on. See also the isSingleChar()
function, which can be used to determine if the data is single or multibyte, and the isUnicode()
function, which determines if the data is Unicode (UTF-16
). The data encoding is specified by the user at initiation time.
oratext *getEncoding( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
The XML parser context. |
Returns a flag which specifies whether data encoding to this context is singlebyte characters (like ASCII, ISO-8859, EBCDIC,
and others), or multibyte characters (like UTF-8
or Unicode
). See getEncoding()
, which returns the name of the data encoding.
boolean isSingleChar( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
The XML parser context |
Returns value of document's standalone flag. This function returns the boolean value of the document's standalone flag, as specified in the XML declaration.
boolean isStandalone( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
The XML parser context |
Returns the Unicode (UCS2) encoding flag. Similar to a isSingleChar()
.
boolean isUnicode(xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
The XML parser context |
Allocates memory and saves the NULL
-terminated single or multibyte string in the XML string pool. Strings saved this way cannot be freed individually since they are stored head-to-tail in a single pool, for maximum compactness. The memory is reused only when the entire pool is freed, after an xmlclean()
or xmlterm()
calls. Use saveString2()
for saving Unicode strings.
oratext *saveString( xmlctx *ctx, oratext *str);
Parameter | IN / OUT | Description |
---|---|---|
xtx |
(IN) |
LPX context |
str |
(IN) |
Pointer to a single or multibyte string. |
Allocates memory and saves the NULL-terminated Unicode string in the XML string pool. Note that a Unicode string is terminated with TWO NULL bytes, not just one! Strings saved this way cannot be freed individually since they are stored head-to-tail in a single pool, for maximum compactness. The memory is reused only when the entire pool is freed, after an xmlclean()
or xmlterm()
calls. Use saveString() for saving single or multibyte strings.
ub2 *saveString2( xmlctx *ctx, ub2 *ustr);
Parameter | IN / OUT | Description |
---|---|---|
xtx |
(IN) |
LPX context |
ustr |
(IN) |
Pointer to a unicode string |
Creates a printed representation of an XML tree rooted at the given node, and puts it into a destination buffer. Indentation is controlled by level and step: step is the number of spaces to indent each new level, and level is the starting level; 0 for top- level.
void printBuffer( oratext *buffer, size_t bufsiz, xmlnode *node, uword step, uword level);
Returns the size of the printed representation of an XML tree, rooted at the given node. Indentation is controlled by level and step as for printBuffer: step is the number of spaces to indent each new level, and level is the starting level; 0 for top-level. This function is used to pre-compute the size of the buffer needed for printBuffer()
.
size_t printSize( xmlnode *node, uword step, uword level);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
root node of XML tree to print |
step |
(IN) |
number of spaces to indent each new level |
level |
(IN) |
starting level of indentation |
Writes a printed representation of an XML tree (rooted at the given node) to a stdio stream (FILE*). This function is exactly like printBuffer except output is to a stream instead of into a buffer. Indentation is controlled by level and step: step is the number of spaces to indent each new level, and level is the starting level (0 for top-level).
void printStream( FILE *stream, xmlnode *node, uword step, uword level);
Sets the document order for each node in the current document. Must be called once on the final document before XSLT processing can occur. Note this is called automatically by the XSLT processor, so ordinarily the user need not make this call.
ub4 setDocOrder(xmlctx *ctx, ub4 start_id);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
start_id |
((N) |
Initial id number to assign |
Sets the I/O callback functions for the given access method.
uword xmlaccess( xmlctx *ctx, xmlacctype access, XML_OPENF((*openf)), XML_CLOSEF((*closef)), XML_READF((*readf)));
Sets the I/O callback functions for the given access method. Most methods have built-in callback functions, so do not have to be provided by the user. The notable exception is XMLACCESS_STREAM
, where the user must set the stream callback functions themselves.
The three callback functions are invoked to open, close, and read from the input source. The functions should have been declared using the function prototype macros XML_OPENF
, XML_CLOSEF
and XML_READF
.
XML_OPENF
is the open function, called once to open the input source. It should set its persistent handle in thexmlihdl
union, which has two choices, a generic pointer(void *)
, and an integer (as unix file or socket handle). This function must returnXMLERR_OK
on success.
XML_CLOSEF
is the close function; it closes an open source and frees resources.
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context. |
ih |
(IN) |
The opened handle. |
XML_READF
is the reader function; it reads data from an open source into a buffer, and returns the number of bytes read:
On EOI, the matching close function will be called automatically.
Recycles memory within the XML parser, but does not free it to the system; only xmlterm()
finally releases all memory back to the system. If xmlclean()
is not called between parses, then the data used by the previous documents remains allocated, and pointers to it are valid. Thus, the data for multiple documents can be accessible simultaneously, although only the current document can be manipulated with DOM.
If only access to only one document's data at a time within a single context is desired, than clear()
should be called before each new parse.
void xmlclean( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
The XML parser context |
Initializes the XML parser. It must be called before any parsing can take place.
err
argument on error. As usual, a zero error code means success, nonzero indicates a problem.xmlterm()
should be called after all processing of XML files has completed.stderr
unless msghdlr
is given.saxcb
callbacks should be set. Note that any of the SAX callback functions may be set to NULL
if not needed.memcb
may be used for user-defined memory allocation. Both alloc()
and free()
functions must be specified.msgctx
, saxcbctx
, and memcbctx
can be used to define and pass information to user-defined callback routines for the message handler, SAX functions, or memory functions, respectively. They should be set to NULL
if user-defined callback functions do not need any additional information passed in to them.lang
parameter determines the language of error messages; the default is "American."err
argument on error. A zero error code means success, nonzero indicates a problem.xmlctx *xmlinit( uword *err, const oratext *incoding, XML_MSGHDLRF((*msghdlr)), void *msgctx, const xmlsaxcb *saxcb, void *saxcbctx, const xmlmemcb *memcb, void *memcbctx, const oratext *lang);
Initializes the XML parser, specifying DOM data encoding. It must be called before any parsing can take place. Same as SAX xmlinit()
, but allows data encoding to be specified.
xmlctx *xmlinitenc( uword *err, const oratext *incoding, const oratext *outcoding, XML_MSGHDLRF((*msghdlr)), void *msgctx, const xmlsaxcb *saxcb, void *saxcbctx, const xmlmemcb *memcb, void *memcbctx, const oratext *lang);
Parameter | IN / OUT | Description |
---|---|---|
Returns current source location while parsing. This function may be called at any time. However, a 0
will be returned for both path
and line
if the call is not made during parsing.
uword xmlLocation( xmlctx *ctx, ub4 *line, oratext **path);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
The XML parser context |
line |
(OUT) |
Current line number |
path |
(OUT) |
Current source path/URL |
Invokes the XML parser on an input document that is specified by a URI. The parser must have been initialized successfully with a call to xmlinit()
or xmlinitenc()
first. Parser options are specified as flag bits OR'd together into the flags
mask.
The default input encoding may be specified as incoding
, which overrides the incoding
given to xmlinit()
. If the input's encoding cannot be determined automatically, based on BOM, XMLDecl, and others, then it is assumed to be incoding
. IANA/Mime encoding names should be used, "UTF-8
", "ASCII
", others.
uword xmlparse( xmlctx *ctx, const oratext *uri, const oratext *incoding, ub4 flags);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN/OUT) |
The XML parser context |
uri |
(IN) |
URI of XML document |
incoding |
(IN) |
Default input encoding |
flags |
(IN) |
Mask of parser option flag bits |
Invokes the XML parser on a buffer. The parser must have been initialized successfully with a call to xmlinit()
or xmlinitenc()
first. Parser options are specified as flag bits OR'd together into the flags
mask.
The default input encoding may be specified as incoding
, which overrides the incoding
given to xmlinit()
. If the input's encoding cannot be determined automatically, based on BOM, XMLDecl, and others, then it is assumed to be incoding
. IANA/Mime encoding names should be used, "UTF-8
", "ASCII
", others.
uword xmlparsebuf( xmlctx *ctx, const oratext *buffer, size_t len, const oratext *incoding, ub4 flags);
Invokes the XML parser on an external DTD file, not a complete document. It is used mainly by the Class Generator to create classes from a DTD without requiring a complete document. The parser must have been initialized successfully with a call to xmlinit()
or xmlinitenc()
first. Parser options are specified as flag bits OR'd together into the flags
mask.
The default input encoding may be specified as incoding
, which overrides the incoding
given to xmlinit()
. If the input's encoding cannot be determined automatically, based on BOM, XMLDecl, and others, then it is assumed to be incoding
. IANA/Mime encoding names should be used, "UTF-8
", "ASCII
", others.
uword xmlparsedtd( xmlctx *ctx, const oratext *filename, oratext *name, const oratext *incoding, ub4 flags);
Invokes the XML parser on a document in the file system. The parser must have been initialized successfully with a call to xmlinit()
or xmlinitenc()
first. Parser options are specified as flag bits OR'd together into the flags
mask.
The default input encoding may be specified as incoding
, which overrides the incoding
given to xmlinit()
. If the input's encoding cannot be determined automatically, based on BOM, XMLDecl, and others, then it is assumed to be incoding
. IANA/Mime encoding names should be used, "UTF-8
", "ASCII
", others.
uword xmlparsefile( xmlctx *ctx, const oratext *path, const oratext *incoding, ub4 flags);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN/OUT) |
The XML parser context |
path |
(IN) |
Filesystem path of the document |
incoding |
(IN) |
Default input encoding |
flags |
(IN) |
Mask of parser option flag bits |
Invokes the XML parser on a user-defined stream. The parser must have been initialized successfully with a call to xmlinit()
or xmlinitenc()
first. Parser options are specified as flag bits OR'd together into the flags
mask to override the default behavior of the parser.
The default input encoding may be specified as incoding
, which overrides the incoding
given to xmlinit()
. If the input's encoding cannot be determined automatically, based on BOM, XMLDecl, and others, then it is assumed to be incoding
. IANA/Mime encoding names should be used, "UTF-8
", "ASCII
", others.
In the context of this function, a stream is a user defined entity; stream
is a stream/context pointer, which is in turn passed to the I/O callback functions. The parser does not reference the stream directly. The I/O callback functions for access method XMLACCESS_STREAM
must be set up first. The stream or stream context pointer will be available in each callback function as the ptr_xmlihdl
memory of the ihdl
structure. Its meaning and use are user-defined.
uword xmlparsestream( xmlctx *ctx, const oratext *stream, const oratext *incoding, ub4 flags);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN/OUT) |
The XML parser context |
stream |
(IN) |
Pointer to a user-defined stream object |
incoding |
(IN) |
Default input encoding |
flags |
(IN) |
Mask of parser option flag bits |
Terminates the XML parser. It should be called after xmlinit
, and before exiting the main program.
uword xmlterm(xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN/OUT) |
The XML parser context |
This function terminates an XML context. All memory used by the parser is returned to the system. The context may not be reused; instead, a new context must be created if additional parsing is to be done. No additional XML parser calls can be made until xmlinit
is called again to get a new context. Compare to xmlclean()
, which recycles memory internally without giving it back to the system, and allows the context to continue to be used.
Returns error location information for the last, or current, error. Returns source location where the current error occurred. Should be called from within an error handler. The source location is a stack. Index 0
is the lowest level where the problem actually occurred, index 1
is the enclosing entity, and so on. To show the whole stack, the index should be looped form 0
to N
, stopping when FALSE
is returned.
boolean xmlwhere( xmlctx *ctx, ub4 *line, oratext **path, unword idx);
SAX is a standard interface for event-based XML parsing, developed cooperatively by the members of the XML-DEV mailing list.
To use SAX, an xmlsaxcb
structure is initialized with function pointers and passed to the xmlinit
call. A pointer to a user-defined context structure may also be included; that context pointer will be passed to each SAX function.
typedef struct { sword (*startDocument)(void *ctx); sword (*endDocument)(void *ctx); sword (*startElement)(void *ctx, const oratext *name, const struct xmlnodes *attrs); sword (*endElement)(void *ctx, const oratext *name); sword (*characters)(void *ctx, const oratext *ch, size_t len); sword (*ignorableWhitespace)(void *ctx, const oratext *ch, size_t len); sword (*processingInstruction)(void *ctx, const oratext *target const oratext *data); sword (*notationDecl)(void *ctx, const oratext *name, const oratext *publicId, const oratext *systemId); sword (*unparsedEntityDecl)(void *ctx, const oratext *name, const oratext *publicId, const oratext *systemId, const oratext *notationName); sword (*nsStartElement)(void *ctx, const oratext *qname, const oratext *local, const oratext *nsp, const struct xmlnodes *attrs); sword (*comment)(void *ctx, const oratext *data); sword (*elementDecl)(void *ctx, const oratext *name, const oratext *content); sword (*attributeDecl)(void *ctx, const oratext *elem, const oratext *attr, const oratext *body); sword (*xmlDecl)(void *ctx, const oratext *version, boolean encoding); } xmlsaxcb;
Data Stricture | Declaration | Description |
---|---|---|
oratext* |
typedef unsigned char oratext; |
Pointer to data; any encoding, including Unicode; cast as needed |
sword |
typedef signed int sword; |
Return value for user SAX callback functions; |
xmlnodes* |
typedef struct xmlnodes xmlnodes; |
Pointer to list of nodes (attributes of an element). Note: |
Receives notification of character data inside an element.
sword (*characters)( void *ctx, const oratext *ch, size_t len);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
User's context |
ch |
(IN) |
Pointer to character data |
len |
(IN) |
Length of data in characters |
Receives notification of the end of the document.
sword (*endDocument) void *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
client context |
Receives notification of the end of an element.
sword (*endElement)( void *ctx, const oratext *name);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
client context |
name |
(IN) |
element type name |
Receives notification of ignorable whitespace in element content.
sword (*ignorableWhitespace)( void *ctx, const oratext *ch, size_t len);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
User's context |
ch |
(IN) |
Pointer to character data |
len |
(IN) |
Length of data in characters |
Receives notification of a notation declaration.
sword (*notationDecl)( void *ctx, const oratext *name, const oratext *publicId, const oratext *systemId);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
User's context |
name |
(IN) |
Notation name |
publicID |
(IN) |
Notation public identifier, |
systemId |
(IN) |
Notation system identifier |
Receives notification of a processing instruction.
sword (*processingInstruction)( void *ctx, const oratext *target, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
User's context |
target |
(IN) |
Processing instruction target |
data |
(IN) |
Processing instruction data; NULL if no data is supplied |
Receives notification of the beginning of the document.
sword (*startDocument)( void *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
User's context |
Receives non-namespace-aware notification of the beginning of an element.
sword (*startElement)( void *ctx, const oratext *name, const struct xmlnodes *attrs);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
User's context |
name |
(IN) |
Element name |
attrs |
(IN) |
Specified or defaulted attributes |
Receives notification of an unparsed entity declaration.
sword (*unparsedEntityDecl)( void *ctx, const oratext *name, const oratext *publicId, const oratext *systemId, const oratext *notationName);
Receives notification about an element's attribute declaration.
sword (*attributeDecl)( void *ctx, const oratext *elem, const oratext *attr, const oratext *body);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
User's context |
elem |
(N) |
Element name |
attr |
(IN) |
Attribute name |
body |
(IN) |
Body of attribute declaration |
Receives notification about a comment.
sword (*comment)( void *ctx, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
client context |
data |
(IN) |
body of comment |
Receives notification about an element declaration.
sword (*elementDecl)( void *ctx, const oratext *name, const oratext *content);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
User's context |
name |
(IN) |
Element name |
content |
(IN) |
Element content model |
Receives namespace-aware notification of the start of an element.
sword (*nsStartElement)( void *ctx, const oratext *qname, const oratext *local, const oratext *namespace, const struct xmlnodes *attrs);
Since the DOM standard is object-oriented, the following changes were made for the C adaptation:
getValue()
in the attribute class was given the unique name getAttrValue()
, matching the pattern established by getNodeValue()
.numChildNodes()
was added.The implementation of this C DOM interface follows REC-DOM-Level-1-19981001.
Data Structure | Declaration | Description |
---|---|---|
boolean |
typedef int boolean; |
Boolean value, TRUE or FALSE |
oratext |
typedef unsigned char oratext; |
String pointer |
xmlctx |
typedef struct xmlctx xmlctx; |
Note: The contents of xmlctx are private and must not be accessed by users. |
xmlnode |
typedef struct xmlnode xmlnode; |
Note: The contents of xmlnode are private and must not be accessed by users. |
xmlnodes |
typedef struct xmlnodes xmlnodes; |
Note: The contents of xmlnodes are private and must not be accessed by users. |
xmlntype |
/* char data not escaped by CDATA */ /* char data escaped by CDATA */ PROCESSING_INSTRUCTION_NODE = 7 /* notation */ |
Note: Names and values match DOM specification. Parse tree node types; see |
Adds new node to the end of the list of children for the given parent and returns the node added.
xmlnode *appendChild( xmlctx *ctx, xmlnode *parent, xmlnode *newnode);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
parent |
(IN) |
parent node |
newnode |
(IN) |
new node to append |
Append the given string to the character data of a TEXT
or CDATA
node.
void appendData( xmlctx *ctx, xmlnode *node, const oratext *arg);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
node |
(IN) |
pointer to node |
arg |
(IN) |
new data to append |
Returns a duplicate of this node; serves as a generic copy constructor for nodes. The duplicate node has no parent, therefore parentNode()
returns NULL
. Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this node. A deep clone is different in that the node's children are also recursively cloned, instead of just being pointed to.
xmlnode *cloneNode( xmlctx *ctx, const xmlnode *old, boolean deep);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
old |
(IN) |
old node to clone |
deep |
(IN) |
recursion flag |
Creates a new ATTRIBUTE
node with the given name and value. The new node is unattached and must be added to an element node with setAttributeNode()
.
xmlnode *createAttribute( xmlctx *ctx, const oratext *name, const oratext *value);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
name |
(IN) |
name of new attribute |
value |
(IN) |
value of new attribute |
Creates a new ATTRIBUTE
node with the given name and value with namespace information. The new node is unattached and must be added to an element node with setAttributeNode()
.
xmlnode *createAttributeNS( xmlctx *ctx, const oratext *uri, const oratext *qname, const oratext *value);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
uri |
(IN) |
namespace URI of new attribute |
qname |
(IN) |
qualified name of new attribute |
value |
(IN) |
value of new attribute |
Creates a new CDATA
node.
xmlnode *createCDATASection( xmlctx *ctx, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
data |
(IN) |
CDATA body |
Creates a new COMMENT
node.
xmlnode *createComment( xmlctx *ctx, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
data |
(IN) |
text of comment |
Creates a new document in memory. The original function createDocument()
has now been standardized in DOM 2.0 CORE. For compatibility, the old function remains with its original usage, and the new CORE function is called createDocumentNS()
. An XML document is always rooted in a node of type DOCUMENT_NODE
; this function creates that root node and sets it in the context. There can be only one current document and hence only one document node; if one already exists, this function does nothing and returns NULL
.
xmlnode* createDocument( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML parser context |
Creates a new DOCUMENT_FRAGMENT
node. A document fragment is a lightweight document object that contains one or more children, but does not have the overhead of a full document. It can be used in some operations (inserting for example) in place of a simple node, in which case all the fragment's children are operated on instead of the fragment node itself.
xmlnode *createDocumentFragment( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
Creates a new document in memory. The original function createDocument()
has now been standardized in DOM 2.0 CORE. For compatibility, the old function remains with its original usage, and the new CORE function is called createDocumentNS. Creates a new document in memory. An XML document is always rooted in a node of type DOCUMENT_NODE
-- this function creates that root node and sets it in the context. There can be only one current document and hence only one document node; if one already exists, this function does nothing and returns NULL
. If a DTD is specified, its ownerDocument()
attribute will be set to the document being created.
xmlnode* createDocumentNS( xmldomimp *imp, oratext *uri, oratext *qname, xmlnode *dtd);
Parameter | IN / OUT | Description |
---|---|---|
imp |
(IN) |
XML DOMImplementation, see |
uri |
(IN) |
new document's namespace URI |
qname |
(IN) |
namespace qualified name of new document; |
dtd |
(IN) |
DTD with which this document is associated |
Creates a new document type (DTD) node.
xmlnode* createDocumentType( xmldomimp *imp,
oratext *qname,
oratext *pubid,
oratext *sysid);
Parameter | IN / OUT | Description |
---|---|---|
imp |
(IN) |
The XML DOM implementation; see |
pubid |
(IN) |
External subset public identifier |
qname |
(IN) |
The namespace qualified name of a new document type; |
sysid |
(IN) |
External subset system identifier |
Create a new ELEMENT
node.
xmlnode *createElement( xmlctx *ctx, const oratext *elname);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
elname |
(IN) |
name of new element |
Creates a new ELEMENT
node with namespace information.
xmlnode *createElementNS( xmlctx *ctx, const oratext *uri, const oratext *qname);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
uri |
(IN) |
namespace URI of new element |
qname |
(IN) |
qualified name of new element |
Creates a new ENTITY_REFERENCE
node.
xmlnode *createEntityReference( xmlctx *ctx, const oratext *name);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
name |
(IN) |
name of entity to reference |
Creates a new PROCESSING_INSTRUCTION
node with the given target and
contents.
xmlnode *createProcessingInstruction( xmlctx *ctx, const oratext *target, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
target |
(IN) |
PI target |
data |
(IN) |
PI definition |
Create a new TEXT node with the given contents.
xmlnode *createTextNode( xmlctx *ctx, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
data |
(IN) |
data for node |
Deletes a substring from the node's character data.
void deleteData( xmlctx *ctx, xmlnode *node, ub4 offset, ub4 count);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
xml context |
node |
(IN) |
pointer to node |
offset |
(IN) |
offset of start of substring; |
count |
(IN) |
length of substring |
Returns one attribute from an array of attributes, given an index (starting at 0
). Fetch the attribute name or value, or both, with getAttrName()
and getAttrValue()
. On error, returns NULL
.
const oratext *getAttribute( const xmlnode *node, const oratext *name);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
name |
(IN) |
name of attribute |
Returns one attribute from an array of attributes, given an index (starting at 0). Fetches the attribute name or value, or both, with getAttrName()
and getAttrValue()
. On error, returns NULL
.
xmlnode *getAttributeIndex( const xmlnodes *attrs, size_t index);
Parameter | IN / OUT | Description |
---|---|---|
attrs |
(IN) |
pointer to attribute nodes structure, as returned by |
index |
(IN) |
zero-based attribute number returned |
Returns the name of the attribute given a pointer to that attribute. Under the DOM spec, this is a method named getName()
.
const oratext *getAttrName( const xmlnode *attr);
Parameter | IN / OUT | Description |
---|---|---|
attr |
(IN) |
pointer to attribute; see |
Returns a pointer to the element node's attribute of the given name. If no such thing exists, returns NULL
.
xmlnode *getAttributeNode( const xmlnode *elem, const oratext *name);
Parameter | IN / OUT | Description |
---|---|---|
elem |
(IN) |
pointer to element node |
name |
(IN) |
name of attribute |
Returns an array of all attributes of the given node. This pointer may then be passed to getAttribute to fetch individual attribute pointers, or to numAttributes
to return the total number of attributes. If no attributes are defined, returns NULL.
xmlnodes *getAttributes( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
node whose attributes to return |
Returns the 'specified' flag for the attribute: if this attribute was explicitly given a value in the original document or through the DOM, this is TRUE; otherwise, it is FALSE. If the node is not an attribute, returns FALSE. Under the DOM spec, this is a method named getSpecified()
.
boolean getAttrSpecified( const xmlnode *attr);
Parameter | IN / OUT | Description |
---|---|---|
attr |
(IN) |
pointer to attribute; see |
Given a pointer to an attribute, returns the "value" (definition) of the attribute. Under the DOM spec, this is a method named getValue()
.
const oratext *getAttrValue( const xmlnode *attr);
Parameter | IN / OUT | Description |
---|---|---|
attr |
(IN) |
pointer to attribute; see |
Returns the character data of a TEXT or CDATA node. Under the DOM spec, this is a method named getData()
.
const oratext *getCharData( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to text node |
Returns the length of the character data of a TEXT or CDATA node. Under the DOM spec, this is a method named getLength()
.
ub4 getCharLength( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to text node |
Returns the nth node in an array of nodes, or NULL if the numbered node does not exist. Invented function, not in DOM, but named to match the DOM pattern.
xmlnode* getChildNode( const xmlnodes *nodes, size_t index);
Parameter | IN / OUT | Description |
---|---|---|
nodes |
(IN) |
array of nodes; see |
index |
(IN) |
zero-based child number |
Returns the array of children of the given node. This pointer may then be passed to getChildNode()
to fetch individual children.
xmlnodes* getChildNodes( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
node whose children to return |
Returns the content model for the named element from the current DTD. The content model is composed of xmlnodes, so may be traversed with the same functions as the parsed document.
xmlnode *getContentModel( xmldtd *dtd, oratext *name);
Parameter | IN / OUT | Description |
---|---|---|
dtd |
(IN) |
pointer to the DTD |
name |
(IN) |
name of element |
Returns the document order cardinal for a node. setDocOrder()
must have been called first or all nodes will have a 0 order. This function is used primarily by the XSLT processor.
ub4 getDocOrder( xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
Node whose doc order to return. |
Returns a pointer to the (opaque) DTD for the current document.
xmldtd* getDocType( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML parser content |
Returns an array of (general) entities defined for the given DTD.
xmlnodes *getDocTypeEntities( xmldtd* dtd);
Parameter | IN / OUT | Description |
---|---|---|
dtd |
(IN) |
pointer to the DTD |
Returns the given DTD's name.
oratext *getDocTypeName( xmldtd* dtd);
Parameter | IN / OUT | Description |
---|---|---|
dtd |
(IN) |
pointer to the DTD |
Returns an array of notations defined for the given DTD.
xmlnodes *getDocTypeNotations( xmldtd* dtd);
Parameter | IN / OUT | Description |
---|---|---|
dtd |
(IN) |
pointer to the DTD |
Returns the root node of the parsed document. The root node is always of type DOCUMENT_NODE
. Compare to the getDocumentElement()
function, which returns the root element node, which is a child of the DOCUMENT node.
xmlnode* getDocument( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML parser context |
Returns the root element (node) of the parsed document. The entire document is rooted at this node. Compare to getDocument which returns the uppermost DOCUMENT node (the parent of the root element node).
xmlnode* getDocumentElement( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML parser context |
Returns the element node which has the given ID. If no such ID is defined (or other problems), returns NULL.
xmlnode *getElementByID( xmlctx *ctx, oratext *id);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML parser context |
id |
(IN) |
element id |
Returns a list of all elements (within the tree rooted at the given node) with a given tag name in the order in which they would be encountered in a pre-order traversal of the tree. If root is NULL
, the entire document is searched. The special value "*" matches all tags.
xmlnodes *getElementsByTagName( xmlctx *ctx, xmlnode *root, const oratext *name);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML parser context |
root |
(IN) |
root node of tree |
name |
(IN) |
element tag name |
Returns a list of all elements (within the tree rooted at the given node) with a given tag name in the order in which they would be encountered in a pre-order traversal of the tree. If root is NULL
, the entire document is searched. The special value "*" matches all tags.
xmlnodes *getElementsByTagNameNS( xmlctx *ctx, xmlnode *root, const oratext *uri, const oratext *local);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML parser context |
root |
(IN) |
root node of tree |
uri |
(IN) |
element namespace uri |
local |
(IN) |
element local name |
Returns an entity node's NDATA (notation). Under the DOM spec, this is a method named getNotationName()
.
const oratext *getEntityNotation( const xmlnode *ent);
Parameter | IN / OUT | Description |
---|---|---|
ent |
(IN) |
pointer to entity |
Returns an entity node's public ID. Under the DOM spec, this is a method named getPublicId()
.
const oratext *getEntityPubID( const xmlnode *ent);
Parameter | IN / OUT | Description |
---|---|---|
ent |
(IN) |
pointer to entity |
Returns an entity node's system ID. Under the DOM spec, this is a method named getSystemId()
.
const oratext *getEntitySysID( const xmlnode *ent);
Parameter | IN / OUT | Description |
---|---|---|
ent |
(IN) |
pointer to entity |
Returns the first child of the given node, or NULL if the node has no children.
xmlnode* getFirstChild( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns a pointer to the DOMImplementation structure for this implementation, or NULL if no such information is available.
xmldomimp* getImplementation xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
Returns the last child of the given node, or NULL if the node has no children.
xmlnode* getLastChild( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns the named node from an array nodes; sets the user's index (if provided) to the child# of the node (first node is zero).
xmlnode *getNamedItem( const xmlnodes *nodes, const oratext *name, size_t *index);
Parameter | IN / OUT | Description |
---|---|---|
nodes |
(IN) |
array of nodes |
name |
(IN) |
name of node to fetch |
index |
(OUT) |
index of found node |
nodes |
(IN) |
array of nodes |
This function returns a pointer to the next sibling of the given node, that is, the next child of the parent. For the last child, NULL
is returned.
xmlnode* getNextSibling( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns the number of nodes in the map, given an array of nodes returned by getChildNodes()
. Under the DOM spec, this is a member function named getLength.
size_t getNodeMapLength(const xmlnodes *nodes);
Parameter | IN / OUT | Description |
---|---|---|
nodes |
(IN) |
array of nodes |
Returns the name of the given node, or NULL if the node has no name. Note that "tagname" and "name" are currently synonymous.
const oratext* getNodeName(const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns the type code for a node.
xmlntype getNodeType( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns the "value" (associated character data) for a node, or NULL if the node has no data.
const oratext* getNodeValue( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Return a notation node's public ID. Under the DOM spec, this is a method named getPublicId()
.
const oratext *getNotationPubID( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Return a notation node's system ID. Under the DOM spec, this is a method named getSystemId()
.
const oratext *getNotationSysID( const xmlnode *note);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns the document node which contains the given node. An XML document is always rooted in a node of type DOCUMENT_NODE. Calling getOwnerDocument()
on any node in the document returns that document node.
xmlnode* getOwnerDocument( xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns the parent node of the given node. For the top-most node, NULL is returned.
xmlnode* getParentNode( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns a Processing Instruction's (PI) data string. Under the DOM spec, this is a method named getData()
.
const oratext *getPIData( const xmlnode *pi);
Parameter | IN / OUT | Description |
---|---|---|
pi |
(IN) |
pointer to PI node |
Returns a Processing Instruction's (PI) target string. Under the DOM spec, this is a method named getTarget()
.
const oratext *getPITarget( const xmlnode *pi);
Parameter | IN / OUT | Description |
---|---|---|
pi |
(IN) |
pointer to PI node |
Returns the previous sibling of the given node; the node at the same level which came before this one. For the first child of a node, NULL
is returned.
xmlnode* getPreviousSibling( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Returns the "tagname" of a node, which is the same as its name for now, see getNodeName. The DOM specification states that "...even though there is a generic nodeName attribute on the Node interface, there is still a tagName attribute on the Element interface; these two attributes must contain the same value, but the Working Group considers it worthwhile to support both, given the different constituencies the DOM API must satisfy."
const oratext *getTagName( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Determines if the given node has any defined attributes, returning TRUE
if so, FALSE
if not. This is a DOM extension named after the pattern started by hasChildNodes()
.
boolean hasAttributes( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Determines if the given node has children, returning TRUE if so, FALSE if not. The same result can be achieved by testing if getChildNodes()
returns a pointer (has children) or NULL (no children).
boolean hasChildNodes( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
Tests if the DOM implementation implements a specific feature and version. feature is the package name of the feature to test. In DOM Level 1, the legal values are "HTML" and "XML" (case-insensitive). version is the version number of the package name to test. In DOM Level 1, this is the string "1.0". If the version is not specified, supporting any version of the feature will cause the method to return TRUE.
boolean hasFeature( xmlctx *ctx, const oratext *feature, const oratext *version);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
feature |
(IN) |
the package name of the feature to test |
version |
(IN) |
the version number of the package name to test |
Imports a node from another document to this document. The returned node has no parent; it is NULL
. The source node is not altered or removed from the original document; this method creates a new copy of the source node. If deep is TRUE, recursively imports the subtree under node; if it's FALSE, imports only the node itself.
Additional information is copied as appropriate to the nodeType
, attempting to mirror the behavior expected if a fragment of XML source was copied from one document to another, recognizing that two documents may have different DTDs. See DOM 2.0 spec for specific action taken for each node type.
xmlnode *importNode( xmlctx *ctx, xmlnode *import, boolean deep);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
import |
(IN) |
node to be imported |
deep |
(IN) |
recursively import subtree? |
Inserts a new node into the given parent node's list of children before the existing reference node. If the reference node is NULL, appends the new node at the end of the list. If the new node is a DocumentFragment
, its children are inserted, in the same order, instead of the fragment itself. If the new node is already in the tree, it is first removed.
xmlnode *insertBefore( xmlctx *ctx, xmlnode *parent, xmlnode *newChild, xmlnode *refChild);
Inserts a string into the node character data at the specified offset.
void insertData( xmlctx *ctx, xmlnode *node, ub4 offset, const oratext *arg);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
node |
(IN) |
pointer to node |
offset |
(IN) |
insertion point, |
arg |
(IN) |
new string to insert |
Returns the value of the standalone flag as specified in the document's <?xml?> processing instruction. This is an invented function, not in DOM spec, but named to match the DOM pattern.
boolean isStandalone( xmlctx *ctx);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
Validates a node against the DTD. Returns 0
on success, else a nonzero error code (which can be looked up in the message file). This function is provided for applications which construct their own documents using the API or Class Generator, or both.. Normally the parser will validate the document and the user need not call nodeValid explicitly.
uword nodeValid( xmlctx *ctx, const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
node |
(IN) |
pointer to node |
"Normalizes" an element, or merges adjacent TEXT nodes. Adjacent TEXT nodes don't happen during a normal parse, only when extra nodes are inserted using the DOM.
void normalize( xmlctx *ctx, xmlnode *elem);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
elem |
(IN) |
pointer to element node |
Returns the number of defined attributes in an attribute array (as returned by getAttributes). This is an invented function, not in the DOM spec, but named after the DOM pattern.
size_t numAttributes( const xmlnodes *attrs);
Parameter | IN / OUT | Description |
---|---|---|
attrs |
(IN) |
array of attributes |
Returns the number of children in an array of nodes (as returned by getChildNodes). This is an invented function, not in the DOM spec, but named after the DOM pattern.
size_t numChildNodes(const xmlnodes *nodes);
Parameter | IN / OUT | Description |
---|---|---|
nodes |
(IN) |
pointer to opaque nodes structure |
Returns the matching URI given a namespace prefix and a node. If the given node doesn't have a matching prefix, its parent is tried, then *its* parent, and so on, all the way to the root node. If the prefix is undefined, NULL
is returned.
oratext *prefixToURI( xmlnode *node, oratext *prefix);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
Starting node |
prefix |
(IN) |
Prefix to match |
Removes the named attribute from an element node. If the removed attribute has a default value it is immediately replaced.
void removeAttribute( xmlnode *elem, const oratext *name);
Parameter | IN / OUT | Description |
---|---|---|
elem |
(IN) |
pointer to element node |
name |
(IN) |
name of attribute to remove |
Removes an attribute from an element, given a pointer to the attribute. If successful, returns the attribute node back. On error, returns NULL.
xmlnode *removeAttributeNode( xmlnode *elem, xmlnode *attr);
Parameter | IN / OUT | Description |
---|---|---|
elem |
(IN) |
pointer to element node |
attr |
(IN) |
attribute node to remove |
Removes the given node from its parent and returns it.
xmlnode *removeChild( xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
old node to remove |
Removes the named node from an array of nodes.
xmlnode *removeNamedItem( xmlnodes *nodes, const oratext *name);
Parameter | IN / OUT | Description |
---|---|---|
nodes |
(IN) |
list of nodes |
name |
(IN) |
name of node to remove |
Replaces an existing child node with a new node and returns the old node. If the new node is already in the tree, it is first removed.
xmlnode *replaceChild( xmlctx *ctx, xmlnode *newChild, xmlnode *oldChild);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
newChild |
(IN) |
new replacement node |
oldChild |
(IN) |
old node being replaced |
Replaces the substring at the given character offset and length with a replacement string.
void replaceData( xmlctx *ctx, xmlnode *node, ub4 offset, ub4 count, oratext *arg);
Saves a character string in the XML memory pool. The memory will be freed after an xmlclean or xmlterm call.
oratext *saveString( xmlctx *ctx, oratext *str);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
str |
(IN) |
string to save |
Allocates memory and saves the NULL-terminated Unicode string in the XML string pool. Note that a Unicode string is terminated with TWO NULL bytes, not just one! Strings saved this way cannot be freed individually since they are stored head-to-tail in a single pool, for maximum compactness. The memory is reused only when the entire pool is freed, after an xmlclean()
or xmlterm()
calls. Use saveString() for saving single or multibyte strings.
ub2 *saveString2( xmlctx *ctx, ub2 *ustr);
Parameter | IN / OUT | Description |
---|---|---|
xtx |
(IN) |
LPX context |
ustr |
(IN) |
Pointer to a unicode string |
Creates a new attribute for an element. If the named attribute already exists, its value is simply replaced.
xmlnode *setAttribute( xmlctx *ctx, xmlnode *elem, const oratext *name, const oratext *value);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
elem |
(IN) |
pointer to element node |
name |
(IN) |
name of new attribute |
value |
(IN) |
value of new attribute |
Adds a new attribute to the given element. If the named attribute already exists, it is replaced and the user's old pointer (if provided) is set to the old attr. If the attribute is new, it is added and the old pointer is set to NULL. Returns a truth value indicating success.
boolean setAttributeNode( xmlctx *ctx, xmlnode *elem, xmlnode *newNode, xmlnode **oldNode);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
elem |
(IN) |
pointer to element node |
newNode |
(IN) |
pointer to new attribute |
oldNode |
(OUT) |
return pointer for old attribute |
Sets an attribute's value.
void setAttrValue( xmlnode *attr, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
attr |
(IN) |
attribute whose value must be set |
data |
(IN) |
new value for attribute |
Sets a TEXT or CDATA node's value.
void setCharData( xmlnode *node, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
node whose data must be set |
data |
(IN) |
new text for node |
Sets a new child node in a parent node's map; if an old node exists with same name, replaces the old node (and sets user's pointer, if provided, to it); if no such named node exists, appends node to map and sets pointer to NULL.
boolean setNamedItem( xmlctx *ctx, xmlnode *parent, xmlnode *node, xmlnode **old);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
parent |
(IN) |
parent to add node to |
node |
(IN) |
new node to add |
old |
(IN) |
pointer to replaced node |
Sets the value (character data) associated with a node.
boolean setNodeValue( xmlnode *node, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
pointer to node |
data |
(IN) |
new data for node |
Sets a Processing Instruction's (PI) data (equivalent to setNodeValue). It is not permitted to set the data to NULL. Under the DOM spec, this is a method named setData()
.
void setPIData( xmlnode *pi, const oratext *data);
Parameter | IN / OUT | Description |
---|---|---|
pi |
(IN) |
pointer to PI node |
data |
(IN) |
new data for PI |
Breaks a TEXT node into two TEXT nodes at the specified offset, keeping both in the tree as siblings. The original node then only contains all the content up to the offset point. And a new node, which is inserted as the next sibling of the original, contains all the old content starting at the offset point.
xmlnode *splitText( xmlctx *ctx, xmlnode *old, uword offset);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
old |
(IN) |
original node to split |
offset |
(IN) |
offset of split point |
Returns a substring of a node's character data.
const oratext *substringData( xmlctx *ctx, const xmlnode *node, ub4 offset, ub4 count);
Parameter | IN / OUT | Description |
---|---|---|
ctx |
(IN) |
XML context |
node |
(IN) |
pointer to node |
offset |
(IN) |
offset of start of substring |
count |
(IN) |
length of substring |
Namespace APIs provide an interface that is an extension to the DOM and give information relating to the document namespaces.
Returns the local name of this attribute.
const oratext *getAttrLocal( const xmlattr *attr);
Parameter | IN / OUT | Description |
---|---|---|
attr |
(IN) |
pointer to opaque attribute structure; see getAttribute() |
Returns namespace for this attribute.
const oratext *getAttrNamespace( const xmlattr *attr);
Parameter | IN / OUT | Description |
---|---|---|
attr |
(IN) |
pointer to opaque attribute structure; see getAttribute() |
Returns prefix for this attribute.
const oratext *getAttrPrefix( const xmlattr *attr);
Parameter | IN / OUT | Description |
---|---|---|
attr |
(IN) |
pointer to opaque attribute structure; see getAttribute() |
Returns fully qualified name for the attribute.
const oratext *getAttrQualifiedName( const xmlattr *attr);
Parameter | IN / OUT | Description |
---|---|---|
attr |
(IN) |
pointer to opaque attribute structure; see getAttribute() |
This function returns the local name of this node.
const oratext *getNodeLocal( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
node from which local name is retrieved |
Returns namespace for this node.
const oratext *getNodeNamespace( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
node from which namespace is retrieved |
Returns prefix for this node.
const oratext *getNodePrefix( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
node from which prefix is retrieved |
Returns fully qualified name for this node.
const oratext *getNodeQualifiedName( const xmlnode *node);
Parameter | IN / OUT | Description |
---|---|---|
node |
(IN) |
node from which name is retrieved |
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|