Oracle9i XML API Reference - XDK and Oracle XML DB Release 2 (9.2) Part Number A96616-01 |
|
This chapter contains the following sections:
This class contains methods for accessing the name and value of a single document node attribute.
Method | Description |
---|---|
Return name of attribute |
|
Return "value" (definition) of attribute |
|
Return attribute's "specified" flag value |
|
Set an attribute's value |
Returns name of attribute
DOMString getName();
Return "value" (definition) of attribute
DOMString getValue();
Returns value of attribute's "specified" flag. From the DOM. If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false. Note that the implementation is in charge of this attribute, not the user. If the user changes the value of the attribute (even if it ends up having the same value as the default value) then the specified flag is automatically flipped to true. To re-specify the attribute as the default value from the DTD, the user must delete the attribute. The implementation will then make a new attribute available with specified set to false and the default value (if one exists).
boolean getSpecified();
Sets an attribute's "value"
void setValue(DOMString value);
Parameter | Description |
---|---|
value |
Attribute's new value |
This class implements the CDATA node type, a subclass of Text. It inherits all of its methods from the Text Class.
This class implements the COMMENT node type, a subclass of CharacterData. It inherits all of this methods from the CharacterData Class.
This class contains methods for accessing and modifying the data associated with text nodes.
Appends a string to this node's data.
void appendData(DOMString arg);
Parameter | Description |
---|---|
arg |
String to append |
Deletes a substring to this text node's data.
void deleteData( unsigned long offset, unsigned long count);
Parameter | Description |
---|---|
count |
Number of characters to remove |
offset |
Start of substring to remove ( |
Retrieves data (value) of a text node as a DOMString.
DOMString getData();
Returns the length of a text node's data
size_t getLength();
Inserts a string into this node's data
void insertData( unsigned long offset, DOMString arg);
Parameter | Description |
---|---|
arg |
String to insert. |
offset |
Insertion point ( |
Replaces a substring in this node's data.
void replaceData( unsigned long offset, unsigned long count, DOMString arg);
Parameter | Description |
---|---|
arg |
string to insert |
count |
number of characters to replace |
offset |
insertion point ( |
Sets data, or value, of a text node.
void setData( DOMString data);
Parameter | Description |
---|---|
data |
Data for node |
Fetches a substring of a node's data.
DOMString substringData( unsigned long offset, unsigned long count);
Parameter | Description |
---|---|
count |
length of substring |
offset |
start of substring ( |
This class contains methods for creating and retrieving nodes.
Creates a new attribute node, and returns a pointer to that node. Use setValue()
to set its value.
Attr* createAttribute( DOMString name, DOMString value);
Parameter | Description |
---|---|
name |
name of attribute |
value |
value of attribute |
Creates a new attribute node with namespace information, and returns a pointer to that node. Use setValue()
to set its value.
Attr* createAttribute( DOMString nspuri, DOMString qname, DOMSring value);
Parameter | Description |
---|---|
nspuri |
element's namespace URI |
qname |
qualified name of attribute |
value |
value of attribute |
Creates a new CDATA node with the given contents, and returns a pointer to that node.
CDATASection* createCDATASection( DOMString data);
Parameter | Description |
---|---|
data |
Contents of node. |
Creates a new comment node with given contents, and returns a pointer to that node.
Comment* createComment( DOMString data);
Parameter | Description |
---|---|
data |
contents of node |
Creates a new document fragment node and returns a pointer to that node.
DocumentFragment* createDocumentFragment();
Creates a new element node with the given tag name and returns a pointer to that node.
Element* createElement( DOMString tagName);
Parameter | Description |
---|---|
tagName |
element's tag name |
Creates a new element node with the given (tag) name and namespace information, and returns a pointer to that node.
Element* createElementNS( DOMString nspuri, DOMSring qname);
Parameter | Description |
---|---|
nspuri |
element's namespace URI |
qname |
element's qualified name |
Creates a new entity reference node and returns a pointer to that node.
EntityReference* createEntityReference( DOMString name);
Parameter | Description |
---|---|
name |
name of entity to reference |
Creates a new processing instruction node and returns a pointer to that node.
ProcessingInstruction* createProcessingInstruction( DOMString target, DOMString data);
Parameter | Description |
---|---|
data |
data for node |
target |
target part of PI |
Creates a new TEXT node and returns a pointer to that node.
Text* createTextNode( DOMString data);
Parameter | Description |
---|---|
data |
data for node |
Returns the element node with the given ID. If no such ID is defined (or other problems are found), returns NULL
.
Element* getElementByID( DOMString name);
Parameter | Description |
---|---|
name |
element ID |
Returns a NodeList of all the Elements with a given tag name in the order in which they would be encountered in a preorder traversal of the Document tree. If elem is NULL
, the entire document is searched. The special value "*"
matches all tags. If no matches are found, returns NULL
. The options are described in the following table.
Parameter | Description |
---|---|
elem |
root node |
tagname |
tag name to select |
nspuri |
namespace URI |
local |
namespace local name |
Returns the DOMImplementation structure. This function is currently not in use, and is reserved for future DOM implementations.
DOMImplementation* getImplementation();
Imports a node from another document to this document, and returns a pointer to that node. The returned node has no parent; its value 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 is 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 SOM 2.0 spec for specific action taken for each node type.
xmlnode *importNode( smlctx *ctx, xmlnode *import, boolean deep);
Parameter | Description |
---|---|
ctx |
XML context. |
deep |
Recursively import subtree - |
import |
Node to be imported. |
Allocates memory and saves the given string, returning a pointer to that string. Used to store locally generated strings.
DOMString saveString( DOMString str);
Parameter | Description |
---|---|
str |
string to save |
This class contains methods for accessing information about the Document Type Definition (DTD) of a document.
Method | Description |
---|---|
Returns name of DTD. |
|
Returns NamedNodeMap of DTD's (general) entities. |
|
Returns NamedNodeMap of DTD's notations. |
Returns name of DTD.
DOMString getName();
Returns map of DTD's (general) entities.
NamedNodeMap* getEntities();
Returns map of DTD's notations.
NamedNodeMap* getNotations();
This class contains methods relating to the specific DOM implementation supported by the parser.
Method | Description |
---|---|
Creates and returns a |
|
Creates and returns a |
|
Tests if the DOMImplementation implements a specific feature. |
Creates a DOCUMENT
node and returns a pointer to that node. When DTD is not NULL
, its Node.ownerDocument
attribute is set to the document being created.
Document *createDocument( DOMString uri, DOMString qname, DocumentType *dtd);
Parameter | Description |
---|---|
dtd |
document type (DTD) |
qname |
qualified name of the new document element |
uri |
namespace URI of the new document element |
Creates a DOCUMENT_TYPE
(DTD) node and returns a pointer to that node.
DocumentType *createDocumentType( DOMString qname, DOMString pubid, DOMString sysid);
Parameter | Description |
---|---|
pubid |
external subset system identifier |
qname |
qualified name of the new document element |
sysid |
external subset system identifier |
Tests if the DOM implementation implements a specific feature. Returns TRUE
if the feature is supported, FALSE
otherwise.
boolean hasFeature( DOMString feature, DOMString version);
This class contains methods pertaining to element nodes.
Returns "value" (definition) of named attribute.
DOMString getAttribute( DOMString name);
Parameter | Description |
---|---|
name |
name of attribute |
Returns pointer to named attribute, or NONE
if not found.
Attr* getAttributeNode( DOMString name);
Parameter | Description |
---|---|
name |
name of attribute |
Creates and returns a list of matching elements.
NodeList* getElementsByTagName( DOMString name);
Parameter | Description |
---|---|
name |
tag name to match, " |
Creates and returns a list of matching elements, namespace aware.
NodeList* getElementsByTagNameNS( DOMString nspuri, DOMString local);
Parameter | Description |
---|---|
local |
Local name to match, " |
nspuri |
Namespace URI. |
Returns the tag name of the element. 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 DOM Working Group considers it worthwhile to support both, given the different constituencies the DOM API must satisfy.
DOMString getTagName();
Initializes a newly allocated element node. Returns 0
on success, or an error code on failure.
uword initialize( Document *doc, DOMString nspuri, DOMString qname);
Parameter | Description |
---|---|
doc |
XML document. |
nspuri |
Namespace URI. |
qname |
Qualified name. |
Normalizes an element; merge all adjacent TEXT nodes.
void normalize();
Removes the named attribute.
void removeAttribute( DOMString name);
Parameter | Description |
---|---|
name |
name of attribute to remove |
Removes the named attribute node and passes it back.
Attr* removeAttributeNode( Attr* oldAttr);
Parameter | Description |
---|---|
name |
attribute to remove |
Creates a new attribute. Returns a pointer to the newly created attribute.
Attr* setAttribute( DOMString name, DOMString value);
Parameter | Description |
---|---|
name |
name of new attribute |
value |
value of new attribute |
Sets (adds) new attribute node.
boolean setAttributeNode( Attr* newAttr, Attr** oldAttr);
Parameter | Description |
---|---|
newAttr |
pointer to a new attribute |
oldAttr |
returned pointer to replaced attribute |
This class implements the ENTITY
node type, a subclass of Node
.
Method | Description |
---|---|
Returns entity's |
|
Returns entity's public ID. |
|
Returns entity's system ID. |
Returns an entity node's notation name (NDATA
).
DOMString* getNotationName();
Returns an entity node's public ID.
DOMString getPublicId();
Returns an entity node's system ID.
DOMString getSystemId();
This class implements the ENTITY_REFERENC
E node type, a subclass of Node.
This class contains methods for accessing the number of nodes in a node map and fetching individual nodes.
Method | Description |
---|---|
Frees the named node map. |
|
Returns number of nodes in map. |
|
Selects a node by name. |
|
Returns nth node in map. |
|
Removes the named node from map. |
|
Sets a node into the map. |
Frees the named node map.
void free();
Returns number of nodes in map.
size_t getLength();
Selects the node with the given name from the map. Returns NULL
if not found.
Node* getNamedItem( String name);
Parameter | Description |
---|---|
name |
Name of node to select |
Returns a pointer to the nth node in node map.
Node* item( size_t index);
Parameter | Description |
---|---|
size_t |
index; zero-based node number |
Removes the node with the given name from the node map. Returns a pointer to removed node, NULL
if not found.
Node* removeNamedItem( String name);
Parameter | Description |
---|---|
name |
name of node to remove |
Adds a node to the map, replacing any node that already exists with the same name.
boolean setNamedItem( Node *node, Node **old);
Parameter | Description |
---|---|
node |
Name of node to add |
old |
Pointer to replaced node, |
This class contains methods for details about a document node
Appends a new child to the current node's list of children and returns a pointer to that node.
Node* appendChild( Node *newChild);
Parameter | Description |
---|---|
newChild |
new child node |
Returns a duplicate of this node; serves as a generic copy constructor for nodes. Returns a pointer to new clone. The duplicate node has no parent; 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.
Node* cloneNode( boolean deep);
Parameter | Description |
---|---|
deep |
recursion flag |
Retrieves structure of all attributes for node. Returns a pointer to structure describing all attributes for node, or NULL
if no attributes are defined
NamedNodeMap* getAttributes();
Returns one of the node's children as a pointer to child of node found through the index.
Node* getChildNode( uword index);
Parameter | Description |
---|---|
index |
child number, starting at 0 |
Returns node's children as a pointer to structure describing all the node's children.
NodeList* getChildNodes();
Returns the node's context
xmlctx* getContext();
Returns a pointer to the node's first child.
Node* getFirstChild();
Returns a pointer to the node's last child.
Node* getLastChild();
Returns the node's local name
DOMString getLocal();
Returns name of node, or NULL
if the node has no name.
DOMString getName();
Returns the node's namespace; may be NULL
.
DOMString getNamespace();
Returns the next sibling of the node; or the next child of the node's parent. NULL
returned if the current child is the last.
Node* getNextSibling();
Returns document node which contains the current node, as a pointer to that document node.
Document* getOwnerDocument();
Returns node's parent.
Node* getParentNode();
Returns the namespace prefix of node; may be NULL
.
DOMString getPrefix();
Returns the previous sibling of the node, or the previous child of the node's parent. NULL
returned if the current child is the first.
Node* getPreviousSibling();
Returns the fully qualified (namespace) name of node.
DOMString getQualifiedName();
Return numeric type code for the node. The possible codes are:
short getType();
Returns "value" (data) of node, or NULL
if the node has no value.
DOMString getValue();
Determines if node has any defined attributes. Returns TRUE
if node has attributes, FALSE
otherwise.
boolean hasAttributes();
Determines if node has any children; returns TRUE
if node has children, FALSE
otherwise.
boolean hasChildNodes();
Inserts a new child node into the list of children of a parent, before the reference node; the pointer to the new child passed back. If the reference node passed in NULL
, appends the new node to the end.
Node* insertBefore( Node *newChild, Node *refChild);
Parameter | Description |
---|---|
newChild |
new node to insert |
refChild |
reference node; new node comes before |
Returns count of node's children; may be 0
.
uword numChildNodes();
Formats XML document to stream or buffer. The options are described in the following table.
Syntax | Description |
---|---|
uwoard step = 4); |
Creates a new parser object. |
uword step =4); |
Creates a new parser object with a given id. |
Parameter | Description |
---|---|
out |
stdio output stream |
level |
starting indentation level |
step |
spaces for each indentation level |
buffer |
destination buffer |
bufsize |
size of destination buffer |
Returns size (in bytes) of formatted XML document, without actually outputting it. Useful for determining final size of document for buffer allocation purposes. Caution, this call is almost as expensive as really outputting the document.
size_t printSize( uword level = 0, uwoard step = 4);
Parameter | Description |
---|---|
level |
starting indentation level |
step |
spaces for each indentation level |
Removes a child node from the current node's list of children, and passes back the removed child.
Node* removeChild();
Replaces one node with another. newChild
replaces oldChild
in the list of children in oldChild
's parent. oldChild
is passed back.
Node* replaceChild( Node *newChild, Node *oldChild);
Parameter | Description |
---|---|
newChild |
new replacement node |
oldChild |
old node being replaced |
Sets a node's "value" (data).
void setValue(DOMString data);
Parameter | Description |
---|---|
data |
new data for the node |
This class contains methods for extracting nodes from a NodeList
.
Method | Description |
---|---|
Returns number of nodes in list. |
|
Returns nth node in list. |
|
Frees the node list. |
Frees the node list.
void free();
Returns number of nodes in list.
size_t getLength();
Returns nth node in node list.
Node* item( size_t index);
Parameter | Description |
---|---|
index |
|
This class implements the NOTATION node type, a subclass of Node.
Method | Description |
---|---|
Returns notation's data. |
|
Returns notation's target. |
|
Sets notation's data. |
Returns a notation's data.
DOMString getData();
Returns a notation's target.
DOMString getTarget();
Sets a notation's data.
void setData( DOMString data);
Parameter | Description |
---|---|
data |
new data |
This class implements a subclass of Node
, PROCESSING_INSTRUCTION
node type.
Method | Description |
---|---|
Returns the PI's data. |
|
Returns the PI's target. |
|
Sets the PI's data. |
Returns data for a processing instruction.
DOMString getData();
Returns a processing instruction's target value.
DOMString getTarget();
Sets the data for a processing instruction.
void setData(DOMString data);
Parameter | Description |
---|---|
data |
PI's new data |
This class contains methods for accessing and modifying the data associated with Text
nodes, a subclasses of CharacterData
.
Gets data (value) of text node. Splits a text node in two. The original node retains its data up to the split point, and the remaining data is turned into a new text node which becomes the next node after. Returns a pointer to the new text node.
Text* splitText( unsigned long offset);
Parameter | Description |
---|---|
offset |
split point |
This class contains top-level methods for invoking the parser and returning high-level information about a document.
Retrieves the context.
xmlctx* context();
Creates a Document
node and returns a pointer to that node. When DTD is not NULL
, the Node.ownerDocument
attribute is set to the document being created.
Document* createDocument( DOMString uri, DOMString qname, DocumentType* dtd);
Parameter | Description |
---|---|
uri |
namespace URI of the new document element |
qname |
qualified name of the new document element |
dtd |
document type (DTD) |
Returns the content model for a node. Content model nodes are Nodes and can be traversed and examined with the same functions as the parsed document.
Node* getContent(Node *node);
Parameter | Description |
---|---|
node |
node whose content model to return |
Returns a pointer to a "DocType" structure which describes the DTD
DocumentType* getDocType();
Returns a pointer to the root node of the document after a document has been successfully parsed. Compare with getDocumentElement which returns the root element node.
Node* getDocument();
Returns a pointer to the root element (node) of the document after a document has been successfully parsed.
Element* getDocumentElement();
Returns the name of the current document's character encoding scheme, such as "ASCII
", "UTF8
", and so on. Compare to isSingleChar
flag that only tells whether encoding is single or multibyte.
DOMString getEncoding();
Returns a flag which specifies whether the current document is encoded as single-byte characters, such as "ASCII
", or multibyte characters, such as "UTF-8
". Compare to getEncoding that returns the actual name of the document's encoding.
boolean isSingleChar();
Returns TRUE
if the document is specified as standalone on the <?xml?> line, FALSE
otherwise
boolean isStandalone();
Sets the I/O callback functions for the given access method. Returns the error code, or 0
on success.
Most methods have built-in callback functions, so none are provided by the user. The notable exception is XMLACCESS_STREAM
, user-defined streams, where the user must set the stream callback functions.
The three callback functions are invoked to open, close, and read from the input source. The functions should be 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 the xmlihdl
union, which has two choices, a generic pointer (void *)
or an integer (as unix file or socket handle). This function must return XMLERR_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) |
input handle union |
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.
uword setAccess( xmlctx *ctx, xmlacctype access, XML_OPENF((*openf)), XML_CLOSEF( (*closef)), XML_READF((*readf)));
Parameter | Description |
---|---|
ctx |
the XML context |
access |
access method enum, |
openf |
open-input callback function |
closef |
close-input callback function |
readf |
Read-input callback function |
Validates the document. Returns error code, 0
on success.
uword validate( Node* root);
Parameter | Description |
---|---|
root |
document node to validate |
Frees any memory used during the previous parse. 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. To access only one document's data at a time, within a single context, call xmlclean()
before each new parse.
void xmlclean();
Initialize XML parser. Returns error code, 0
on success.
uword xmlinit( DOMString incoding, void (*msghdlr)(void *msgctx, DOMString msg, ub4 errcode), void *msgctx, lpxsaxcb *saxcb, void *saxcbctx, DOMString lang);
Initializes encoded XML parser. Returns error code, 0
on success.
uword xmlinitenc( DOMString incoding, DOMString outcoding, void (*msghdlr)(void *msgctx, DOMString msg, ub4 errcode), void *msgctx, lpxsaxcb *saxcb, void *saxcbctx, DOMString *lang);
Parses a document. Returns error code, 0
on success.
uword xmlparse( DOMString doc, DOMString encoding, ub4 flags);
Parameter | Description |
---|---|
doc |
document path |
encoding |
document's encoding |
flags |
mask of flag bits |
Parses a buffer. Returns error code, 0
on success.
uword xmlparseBuffer( DOMString buffer, size_t len, DOMString encoding, ub4 flags);
Parameter | Description |
---|---|
buffer |
buffer containing document to parse |
len |
length of document |
encoding |
document's encoding |
flags |
mask of flag bits |
Parses a DTD. Returns error code, 0
on success.
uword xmlparseDTD( DOMString uri, DOMString name, DOMString encoding, ub4 flags);
Parameter | Description |
---|---|
uri |
URI pointing to DTD |
name |
DTD name |
encoding |
DTD's encoding |
flags |
Mast of flag bits |
Parses a document from a file. Returns error code, 0
on success.
uword xmlparseFile( DOMString path, size_t len, DOMString encoding, ub4 flags);
Parameter | Description |
---|---|
path |
document path |
len |
unused parameter |
encoding |
document's encoding |
flags |
mask of flag bits |
Parses a document from a file. Returns error code, 0
on success.
uword xmlparseStream( DOMString path, void *stream, DOMString encoding, ub4 flags);
Parameter | Description |
---|---|
path |
unused parameter |
stream |
input stream |
encoding |
document's encoding |
flags |
mask of flag bits |
Returns error location information. Should only be called from within user error calback function, while error is current.
boolean xmlwhere( ub4 *line, DOMString *path, uword idx);
Parameter | Description |
---|---|
line |
returned line # where error occurred |
path |
returned path/URL where error occurred |
idx |
position in error stack, starting at |
Terminates XML parser; tear down and free memory.
void xmlterm();
The SAX API is based on callbacks. Instead of the entire document being parsed and turned into a data structure which may be referenced (by the DOM interface), the SAX interface is serial. As the document is processed, appropriate SAX user callback functions are invoked. Each callback function returns an error code, zero meaning success, any nonzero value meaning failure. If a nonzero code is returned, document processing is stopped.
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.
Note this SAX functionality is identical to the C version.
typedef struct { sword (*startDocument) (void *ctx); sword (*endoocument) (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 *public 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); } xmlsaxcb;
Starts document processing; called only once. Returns 0
for success or a numeric error code.
sword startDocument( void *ctx);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
Finishes document processing; called only once. Returns 0
for success or a numeric error code.
sword endDocument( void *ctx);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
Starts processing a new document element; called only once for each element. Returns 0
for success or a numeric error code.
sword startElement( void *ctx, const oratext *name, const struct xmlnodes *attrs);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
name |
name of node |
attrs |
array of node's attributes |
Finishes processing a document element; called only once for each element. Returns 0
for success or a numeric error code.
sword endElement( void *ctx, const oratext *name);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
name |
name of node |
Processes literal text; called for each piece of literal text. Returns 0
for success or a numeric error code.
sword characters( void *ctx, const oratext *ch, size_t len);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
ch |
pointer to text |
len |
number of characters in text |
Processes ignorable (non-significant) whitespace; called for each piece of ignorable whitespace. Returns 0
for success or a numeric error code.
sword ignorableWhitespace( void *ctx, const oratext *ch, size_t len);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
ch |
pointer to whitespace text |
len |
number of characters in whitespace text |
Processes PIs (Processing Instructions); called once for each PI. Returns 0
for success or a numeric error code.
sword processingInstruction( void *ctx, const oratext *target, const oratext *data);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
data |
PI data |
target |
PI target |
Processes notation; called once for each NOTATION
. Returns 0
for success or a numeric error code.
sword notationDecl( void *ctx, const oratext *name, const oratext *publicId, const oratext *systemId);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
name |
name of notation |
publicId |
Public ID |
systemID |
System ID |
Processes unparsed entity declarations; called once for each unparsed entity declaration. Returns 0
for success or a numeric error code.
sword unparsedEntityDecl( void *ctx, const oratext *name, const oratext *publicId, const oratext *systemId, const oratext *notationName);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
name |
name of entity |
publicId |
Public ID |
systemID |
System ID |
notationName |
notation name |
Starts processing a new document element when the element uses an explicit namespace; called only once for each element. Returns 0
for success or a numeric error code.
sword startElement( void *ctx, const oratext *qname, const oratext *local, const oratext *namespace, const struct xmlnodes *attrs);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
qname |
qualified namespac |
local |
element local name |
namespace |
element namespace |
attrs |
specified or default attributes |
Receives notification about an XML source comment. Returns 0
for success or a numeric error code.
sword comment( void *ctx, const oratext *data);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
ldata |
body of comment |
a elementDecl( void*, oratext*, oratext*)
Receives notification about an element declaration. Returns 0
for success or a numeric error code.
sword elementDecl( void *ctx, const oratext *name, const oratext *content);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
name |
name of element being declared |
content |
content model for element |
Receives notification about an element's attribute declaration. Returns 0
for success or a numeric error code.
sword attributeDecl( void *ctx, const oratext *elem, const oratext *attr, const oratext *body);
Parameter | Description |
---|---|
ctx |
User-defined context as passed to |
elem |
name of element for which the attribute is declared |
attr |
name of attribute declared |
body |
body of attribute declaration |
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|