Skip Headers

Oracle® XML API Reference
10g Release 1 (10.1)
Part No. B10789-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents

Previous Next  

GParser Interface

Table 18-3 summarizes the methods of available through the GParser interface.

Table 18-3 Summary of GParser Methods; Parser Package

Function Summary
SetWarnDuplicateEntity
Specifies if multiple entity declarations result in a warning.
getBaseURI
Returns the base URI for the document.
getDiscardWhitespaces
Checks if whitespaces between elements are discarded.
getExpandCharRefs
Checks if character references are expanded.
getSchemaLocation
Get schema location for this document.
getStopOnWarning
Get if document processing stops on warnings.
getWarnDuplicateEntity
Get if multiple entity declarations cause a warning.
setBaseURI
Sets the base URI for the document.
setDiscardWhitespaces
Sets if formatting whitespaces should be discarded.
setExpandCharRefs
Get if character references are expanded.
setSchemaLocation
Set schema location for this document.
setStopOnWarning
Sets if document processing stops on warnings.


SetWarnDuplicateEntity

Specifies if entities that are declared more than once will cause warnings to be issued.


Syntax
void setWarnDuplicateEntity(
   boolean par_bool);

Parameter Description
par_bool
TRUE if multiple entity declarations cause a warning


getBaseURI

Returns the base URI for the document. Usually only documents loaded from a URI will automatically have a base URI. Documents loaded from other sources (stdin, buffer, and so on) will not naturally have a base URI, but a base URI may have been set for them using setBaseURI, for the purposes of resolving relative URIs in inclusion.


Syntax
oratext* getBaseURI() const;


Returns

(oratext *) current document's base URI [or NULL]


getDiscardWhitespaces

Checks if formatting whitespaces between elements, such as newlines and indentation in input documents are discarded. By default, all input characters are preserved.


Syntax
boolean getDiscardWhitespaces() const;


Returns

(boolean) TRUE if whitespace between elements are discarded


getExpandCharRefs

Checks if character references are expanded in the DOM data. By default, character references are replaced by the character they represent. However, when a document is saved those characters entities do not reappear. To ensure they remain through load and save, they should not be expanded.


Syntax
boolean getExpandCharRefs() const;


Returns

(boolean) TRUE if character references are expanded


getSchemaLocation

Gets schema location for this document. It is used to figure out the optimal layout when loading documents into a database.


Syntax
oratext* getSchemaLocation() const;


Returns

(oratext*) schema location


getStopOnWarning

When TRUE is returned, warnings are treated the same as errors and cause parsing, validation, and so on, to stop immediately. By default, warnings are issued but the processing continues.


Syntax
boolean getStopOnWarning() const;


Returns

(boolean) TRUE if document processing stops on warnings


getWarnDuplicateEntity

Get if entities which are declared more than once will cause warnings to be issued.


Syntax
boolean getWarnDuplicateEntity() const;


Returns

(boolean) TRUE if multiple entity declarations cause a warning


setBaseURI

Sets the base URI for the document. Usually only documents that were loaded from a URI will automatically have a base URI. Documents loaded from other sources (stdin, buffer, and so on) will not naturally have a base URI, but a base URI may have been set for them using setBaseURI, for the purposes of resolving relative URIs in inclusion.


Syntax
void setBaseURI( oratext* par);

Parameter Description
par
base URI


setDiscardWhitespaces

Sets if formatting whitespaces between elements (newlines and indentation) in input documents are discarded. By default, ALL input characters are preserved.


Syntax
void setDiscardWhitespaces(
   boolean par_bool);

Parameter Description
par_bool
TRUE if whitespaces should be discarded


setExpandCharRefs

Sets if character references should be expanded in the DOM data. Ordinarily, character references are replaced by the character they represent. However, when a document is saved those characters entities do not reappear. To ensure they remain through load and save is to not expand them.


Syntax
void setExpandCharRefs( 
   boolean par_bool);

Parameter Description
par_bool
TRUE if character references should be discarded


setSchemaLocation

Sets schema location for this document. It is used to figure out the optimal layout when loading documents into a database.


Syntax
 void setSchemaLocation(
   oratext* par);

Parameter Description
par
schema location


setStopOnWarning

When TRUE is set, warnings are treated the same as errors and cause parsing, validation, and so on, to stop immediately. By default, warnings are issued but the processing continues.


Syntax
void setStopOnWarning( 
   boolean par_bool);

Parameter Description
par_bool
TRUE if document processing should stop on warnings