Unicorn XML Toolkit
Version 1.50.00

Namespace Xml
Class CXpathBase

class CXpathBase: public CInterface {
public:
    CXpathBase(CToolkitBase *pToolkitBase);
    ~CXpathBase();
public:
    XXpathExpr CreateExpr(const WCHAR *pszSource);
    XXpathContext CreateContext(CXpathNodeSet *pNodeSet);
    XXpathContext CreateContext(
        Dom::INode *pNode,
        int nCount=1,
        int nPosition=1);
    };
typedef XInterface<CXpathBase> XXpathBase;

Encapsulates toolkit functionality related to XPath.

Since:
1.50.00
Version:
1.50.00
Author:
Alexey Gokhberg
See Also:
CToolkitBase, CXpathContext, CXpathExpr, Dom::INode
Constructor/Destructor Summary
CXpathBase (CToolkitBase *pToolkitBase);
����������Constructs the toolkit XPath base.
~CXpathBase ();
����������Destroys the toolkit XPath base.

Function Summary
XXpathExpr CreateExpr (const WCHAR *pszSource);
����������Creates the XPath expression.
XXpathContext CreateContext (CXpathNodeSet *pNodeSet);
����������Creates the XPath context from the XPath node set.
XXpathContext CreateContext (Dom::INode *pNode, int nCount=1, int nPosition=1);
����������Creates the XPath context from the context node, context size, and context position.

Constructor/Destructor Detail

CXpathBase

CXpathBase(CToolkitBase *pToolkitBase);

Constructs the toolkit XPath base.

Parameters:
pToolkitBase - the master toolkit base

~CXpathBase

~CXpathBase();

Destroys the toolkit XPath base.

Function Detail

CreateExpr

XXpathExpr CreateExpr(const WCHAR *pszSource);

Creates the XPath expression.

This method takes the string representation of the XPath expression, parses it, and stores result in the newly created CXpathExpr object.

It is an error is the expression contains references to functions not from the XPath core function library, or to variables.

Parameters:
pszSource - the string representation of the XPath expression
Returns:
the newly created expression object containing the compiled XPath expression

CreateContext

XXpathContext CreateContext(CXpathNodeSet *pNodeSet);

Creates the XPath context from the XPath node set.

See CXpathContext for details of node set construction.

Parameters:
pNodeSet - the XPath node set
Returns:
the newly created XPath context

CreateContext

XXpathContext CreateContext(
    Dom::INode *pNode,
    int nCount=1,
    int nPosition=1);

Creates the XPath context from the context node, context size, and context position.

The model of the context node must be XDM (that is, DOM nodes are not allowed).

See CXpathContext for details of node set construction.

Parameters:
pNode - the context node
nCount - the context size
nPosition - the context position
Returns:
the newly created XPath context

Unicorn XML Toolkit
Version 1.50.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.