IRISLIB database
Document Class Reference

Implements an interface to the XPATH Document. More...

Inheritance diagram for Document:
Collaboration diagram for Document:

Public Member Functions

_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnNew (_.Library.RawString initvalue)
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status EvaluateExpression (_.Library.String pContext, _.Library.String pExpression, _.Library.ListOfObjects pResults)
 This method evaluates an XPATH context and expression. More...
 
_.Library.String GetPrefix (pUrl)
 May be called to determine the prefix defined for a particular url in the. More...
 
_.Library.Status PrefixMappingsSet (_.Library.String pValue)
 This is the setter for the PrefixMappings, it parses the mappings into. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 

Static Public Member Functions

_.Library.Status CreateFromFile (_.Library.String pSource, _.XML.XPATH.Document pDocument, _.XML.SAX.EntityResolver pResolver, _.XML.XSLT.ErrorHandler pErrorHandler, _.Library.Integer pFlags, _.Library.String pSchemaSpec, _.Library.String pPrefixMappings)
 Use this method a create an instance of an XML.XPATH.Document from a file path name.
 
_.Library.Status CreateFromStream (_.Library.AbstractStream pStream, _.XML.XPATH.Document pDocument, _.XML.SAX.EntityResolver pResolver, _.XML.XSLT.ErrorHandler pErrorHandler, _.Library.Integer pFlags, _.Library.String pSchemaSpec, _.Library.String pPrefixMappings)
 Use this method to create an instance of an XML.XPATH.Document from a binary stream. More...
 
_.Library.Status CreateFromString (_.Library.String pString, _.XML.XPATH.Document pDocument, _.XML.SAX.EntityResolver pResolver, _.XML.XSLT.ErrorHandler pErrorHandler, _.Library.Integer pFlags, _.Library.String pSchemaSpec, _.Library.String pPrefixMappings)
 Use this method to create an instance of a XML.XPATH.Document from a string. More...
 
 Example1 ()
 Evaluates an XPATH expression which returns a DOM Result.
 
 Example2 ()
 Evaluates an XPATH expression which returns a VALUE Result.
 
 Example3 ()
 Evaluates an XPATH expression which returns a VALUE Result ( demonstrates use of CreateFromString() )
 

Public Attributes

 PrefixMappings
 This holds a string specifying prefix mappings for the document. More...
 
 ResultHandler
 This holds the default ResultHandler. More...
 

Private Attributes

 __ParsedSourceHandle
 This property holds a handle to the parsed source. More...
 

Additional Inherited Members

- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 

Detailed Description

Implements an interface to the XPATH Document.

XML contained in a file or binary stream may be selected and navigated. XML.XPATH.Document should never be created directly with New(), but via the CreateFromFile() or CreateFromStream() factory methods

Member Function Documentation

◆ OnClose()

_.Library.Status OnClose ( )

This callback method is invoked by the <METHOD>Close</METHOD> method to.

provide notification that the current object is being closed.

The return value of this method is ignored.

Reimplemented from RegisteredObject.

◆ OnNew()

_.Library.Status OnNew ( _.Library.RawString  initvalue)

This callback method is invoked by the <METHOD>New</METHOD> method to.

provide notification that a new instance of an object is being created. For this class, client code should NOT call this method directly via New() but should use the 'CreateFromFile()' or 'CreateFromStream()' factory methods

◆ CreateFromStream()

_.Library.Status CreateFromStream ( _.Library.AbstractStream  pStream,
_.XML.XPATH.Document  pDocument,
_.XML.SAX.EntityResolver  pResolver,
_.XML.XSLT.ErrorHandler  pErrorHandler,
_.Library.Integer  pFlags,
_.Library.String  pSchemaSpec,
_.Library.String  pPrefixMappings 
)
static

Use this method to create an instance of an XML.XPATH.Document from a binary stream.

It's important to use a binary stream because

if a character stream is used then (for a unicode cache) the characters will be automatically converted to unicode (utf-16). This can cause a problem if the XML stream has a header declaring a different coding as it introduces an inconsistency between the declared encoding and the actual encoding. This will cause the XML Parser to issue an error message and fail.

◆ CreateFromString()

_.Library.Status CreateFromString ( _.Library.String  pString,
_.XML.XPATH.Document  pDocument,
_.XML.SAX.EntityResolver  pResolver,
_.XML.XSLT.ErrorHandler  pErrorHandler,
_.Library.Integer  pFlags,
_.Library.String  pSchemaSpec,
_.Library.String  pPrefixMappings 
)
static

Use this method to create an instance of a XML.XPATH.Document from a string.


The input string is expected to be UTF-8 encoded.

◆ EvaluateExpression()

_.Library.Status EvaluateExpression ( _.Library.String  pContext,
_.Library.String  pExpression,
_.Library.ListOfObjects  pResults 
)

This method evaluates an XPATH context and expression.

The context selects the intial nodeset from the document and

the expression further filters the node set. See http://www.w3.org/TR/xpath for full details of XPATH syntax and usage If the method succeeds it returns a list of Results which can be queried for their types and values.

◆ GetPrefix()

_.Library.String GetPrefix (   pUrl)

May be called to determine the prefix defined for a particular url in the.

Prefix Mappings passed to the CreateFromXXX() calls

◆ PrefixMappingsSet()

_.Library.Status PrefixMappingsSet ( _.Library.String  pValue)

This is the setter for the PrefixMappings, it parses the mappings into.

an array which can be queried by the GetPrefix() method

Member Data Documentation

◆ __ParsedSourceHandle

__ParsedSourceHandle
private

This property holds a handle to the parsed source.

 

◆ PrefixMappings

PrefixMappings

This holds a string specifying prefix mappings for the document.

This is a comma delimited list

of prefix to namespace mappings. Each mapping is defined as a prefix, a space and then the uri to which that prefix maps. This is especially useful if the document defines a default namespace with the xmlns="http://somenamespaceuri" syntax but does not supply an explicit prefix mapping. For example, this PrefixMappings string would map the myprefix prefix to the http://somenamespaceuri uri.

"myprefix http://somenamespaceuri  

◆ ResultHandler

This holds the default ResultHandler.