#include <XMLDataSource.h>
List of all members.
Public Member Functions |
| | TXMLDataSource () |
| | TXMLDataSource (NAMESPACE_Zeus::IXMLDocument &rDocument) |
| virtual | ~TXMLDataSource () |
| void | closeXML () |
| bool | isAvailable () const |
| void | setXMLDocument (NAMESPACE_Zeus::IXMLDocument &rDocument) |
| Retval | loadXML (NAMESPACE_Zeus::IXMLDocument *&rpDocument) |
| Retval | loadXObjects (IXObject *&rpObject, bool dDoUnfreeze=true, bool bKeepXObjectAfterClosing=false) |
| TString | getDocumentStream () const |
| Retval | selectNode (const IString &rXPath, IXMLNode *&rpNode) |
| Retval | selectNodes (const IString &rXPath, IXPathResults *&rpResults) |
| Retval | selectNodeValue (const IString &rXPath, IString &rValue) |
| Retval | selectObject (const IString &rXObjectPath, IXObject *&rpObject) |
| Retval | selectObjects (const IString &rXObjectPath, IXObjectCollection *&rpCollection) |
| Retval | selectCastedObject (const IString &rXObjectPath, const InterfaceID &rInterfaceID, IZUnknown *&rpObject) |
| void | useNamespace (const IString &rPrefix, const IString &rNamespace) |
| Retval | writeNodeValue (const IString &rXPath, const IString &rValue) |
Detailed Description
the xml data source handles any xml document and provides a comfortable interface for XML.
Constructor & Destructor Documentation
| TXMLDataSource::TXMLDataSource |
( |
) |
|
creates an empty data source
| TXMLDataSource::TXMLDataSource |
( |
NAMESPACE_Zeus::IXMLDocument & |
rDocument ) |
|
creates a data source out of a XML document
- Parameters:
-
| rDocument | : Document source |
| TXMLDataSource::~TXMLDataSource |
( |
) |
[virtual] |
Member Function Documentation
| void TXMLDataSource::closeXML |
( |
) |
|
Releases the internal data source
| TString TXMLDataSource::getDocumentStream |
( |
) |
const |
Returns the stream of the XML document
| bool zeus::TXMLDataSource::isAvailable |
( |
) |
const [inline] |
Checks if the data source is available
| Retval TXMLDataSource::loadXML |
( |
NAMESPACE_Zeus::IXMLDocument *& |
rpDocument ) |
|
loads an XML file and returns the XML Document instance
| Retval TXMLDataSource::loadXObjects |
( |
IXObject *& |
rpObject, |
|
|
bool |
dDoUnfreeze = true, |
|
|
bool |
bKeepXObjectAfterClosing = false |
|
) |
| |
loads an XML file and returns the XObject instance
- Parameters:
-
| rpObject | : Return parameter |
| dDoUnfreeze | : if flag is set (default) the unfreezing will be executed |
| bKeepXObjectAfterClosing | : If this flag is set the object is kept after closing and destroing the XML file. The user must call freeze(). If the flag is not set (default) the loaded X-object will be freezed within closing the file. |
- Return values:
-
| RET_NOERROR | : Object returned |
| RET_REQUEST_FAILED,: | Could not load the XML file |
| RET_UNREGISTERED_CLASS | : Class not registered |
Queries an x-object and casts the object to a requested interface
- Parameters:
-
| rXObjectPath | : xobject path |
| rInterfaceID,: | Interface ID |
| rpObject | : return value |
- Return values:
-
| RET_NOERROR | : object returned |
| RET_REQUEST_FAILED | : Could not query object |
| Retval TXMLDataSource::selectNode |
( |
const IString & |
rXPath, |
|
|
IXMLNode *& |
rpNode |
|
) |
| |
Queries an xml node by XPath
- Parameters:
-
| rXPath | : xpath query |
| rpNode | : return value |
- Return values:
-
| RET_NOERROR | : node returned |
| RET_REQUEST_FAILED | : Could not query node |
Queries xml nodes by XPath
- Parameters:
-
| rXPath | : xpath query |
| rpResults | : return value |
- Return values:
-
| RET_NOERROR | : nodes returned |
| RET_REQUEST_FAILED | : Could not query nodes |
| Retval TXMLDataSource::selectNodeValue |
( |
const IString & |
rXPath, |
|
|
IString & |
rValue |
|
) |
| |
Queries an xml node value by XPath
- Parameters:
-
| rXPath | : xpath query |
| rValue | : return value |
- Return values:
-
| RET_NOERROR | : node returned |
| RET_REQUEST_FAILED | : Could not query node |
| Retval TXMLDataSource::selectObject |
( |
const IString & |
rXObjectPath, |
|
|
IXObject *& |
rpObject |
|
) |
| |
Queries an x-object by the the x object path
- Parameters:
-
| rXObjectPath | : xobject path |
| rpObject | : return value |
- Return values:
-
| RET_NOERROR | : object returned |
| RET_REQUEST_FAILED | : Could not query object |
Queries a set of x-objects by the the x object path
- Parameters:
-
| rXObjectPath | : xobject path |
| rpCollection | : return value |
- Return values:
-
| RET_NOERROR | : collection returned |
| RET_REQUEST_FAILED | : Could not query collection |
| void TXMLDataSource::setXMLDocument |
( |
NAMESPACE_Zeus::IXMLDocument & |
rDocument ) |
|
| void TXMLDataSource::useNamespace |
( |
const IString & |
rPrefix, |
|
|
const IString & |
rNamespace |
|
) |
| |
Sets a prefix for namespace usage
| Retval TXMLDataSource::writeNodeValue |
( |
const IString & |
rXPath, |
|
|
const IString & |
rValue |
|
) |
| |
Writes a node value to the XML file
- Parameters:
-
| rXPath | : X-path to select the element or attribute |
| rValue | : value to assign |
- Return values:
-
| RET_REQUEST_FAILED | : could not find the node |
| RET_NOERROR | : value assigned |
The documentation for this class was generated from the following files: