ZeusBase-Library  2.0.4
zeus::IXMLDocument Class Referenceabstract

#include <IXMLDocument.hpp>

Inheritance diagram for zeus::IXMLDocument:
zeus::IZUnknown zeus::IXSDDocument

Public Member Functions

virtual Retval MQUALIFIER getMainNode (IXMLNode *&rpMainNode)=0
 
virtual Retval MQUALIFIER getStream (IString &rstrStream) const =0
 
virtual Retval MQUALIFIER getStream2 (IOutputStream &rStream) const =0
 
virtual Retval MQUALIFIER save (bool bDoAutoFormat=false)=0
 
virtual Retval MQUALIFIER saveAs (const IString &rstrFilename, bool bKeepOrginalFileName=false, bool bDoAutoFormat=false)=0
 
virtual Retval MQUALIFIER createNewNode (IXMLNode::ENodeType eNodeType, const IString &rstrName, const IString &rstrUri, IXMLNode *&rpNode)=0
 
virtual Retval MQUALIFIER validate (IXMLErrorReporter *pReporter=NULL)=0
 
virtual Retval MQUALIFIER getNodeList (IXMLNodeList *&rpList)=0
 
virtual void MQUALIFIER getFileName (IString &rstrFileName) const =0
 
virtual void MQUALIFIER setFileName (const IString &rstrFileName)=0
 
virtual void MQUALIFIER useNamespace (const IString &rstrPrefix, const IString &rstrNameSpace)=0
 
virtual void MQUALIFIER removeNamespace (const IString &rstrPrefix)=0
 
virtual Retval MQUALIFIER getImplPtr (INativePointer &rImpl) const =0
 
- Public Member Functions inherited from zeus::IZUnknown
virtual Retval MQUALIFIER askForInterface (const InterfaceID &rInterfaceID, IZUnknown *&rpIface)=0
 
virtual void MQUALIFIER addRef () const =0
 
virtual void MQUALIFIER release () const =0
 

Detailed Description

The interface defines a complete xml document (as DOM tree).

Member Function Documentation

§ createNewNode()

virtual Retval MQUALIFIER zeus::IXMLDocument::createNewNode ( IXMLNode::ENodeType  eNodeType,
const IString rstrName,
const IString rstrUri,
IXMLNode *&  rpNode 
)
pure virtual

Creates a new xml DOM node. The node will be returned to the caller and can be inserted or added using the IXMLNode method insert() or append().

Parameters
eNodeTypeType of the node (see defines)
rstrNameName of the node
rstrUriRessource identifier (not used for all types -> see XML spec. of xercesc and MSXML).
rpNodereturn parameter of the created node.
Return values
RET_NOERRORNode created.
RET_REQUEST_FAILEDCould not create the node

§ getFileName()

virtual void MQUALIFIER zeus::IXMLDocument::getFileName ( IString rstrFileName) const
pure virtual

Returns the file name of the XML document. If the file name is empty, the document was built out of a stream.

Parameters
rstrFileNameReturn parameter of file name

§ getImplPtr()

virtual Retval MQUALIFIER zeus::IXMLDocument::getImplPtr ( INativePointer rImpl) const
pure virtual

This method returns the implementation pointer of a concrete xml document. Do not use this method outside of the XML_Service module

Parameters
rImplreturn parameter
Return values
RET_NOERRORAPI pointer returned
RET_REQUEST_FAILEDno API pointer found

§ getMainNode()

virtual Retval MQUALIFIER zeus::IXMLDocument::getMainNode ( IXMLNode *&  rpMainNode)
pure virtual

Returns the main node of the xml dom tree

Parameters
rpMainNodereturn parameter of the main node
Return values
RET_NOERRORmain node returned.
RET_REQUEST_FAILEDCould not return the main node

§ getNodeList()

virtual Retval MQUALIFIER zeus::IXMLDocument::getNodeList ( IXMLNodeList *&  rpList)
pure virtual

Returns the complete node list of the xml dom tree.

Parameters
rpListreturn parameter of the list
Return values
RET_NOERRORlist returned.
RET_REQUEST_FAILEDCould not return the list

§ getStream()

virtual Retval MQUALIFIER zeus::IXMLDocument::getStream ( IString rstrStream) const
pure virtual

Returns the DOM buffer as a stream.

Parameters
rstrStreamreturn parameter of a stream of data
Return values
RET_NOERRORStream returned
RET_REQUEST_FAILEDCould return stream

§ getStream2()

virtual Retval MQUALIFIER zeus::IXMLDocument::getStream2 ( IOutputStream rStream) const
pure virtual

Returns the DOM buffer as a output stream.

Parameters
rStreamreturn parameter of a stream of data
Return values
RET_NOERRORStream returned
RET_REQUEST_FAILEDCould return stream

§ removeNamespace()

virtual void MQUALIFIER zeus::IXMLDocument::removeNamespace ( const IString rstrPrefix)
pure virtual

Removes a specific name space.

Parameters
rstrPrefixPrefix to use

§ save()

virtual Retval MQUALIFIER zeus::IXMLDocument::save ( bool  bDoAutoFormat = false)
pure virtual

Saves the document. This method will fail, if a stream has been loaded previously.

Parameters
bDoAutoFormatEnable auto format tags on saved file.
Return values
RET_NOERRORFile saved
RET_REQUEST_FAILEDCould not save file

§ saveAs()

virtual Retval MQUALIFIER zeus::IXMLDocument::saveAs ( const IString rstrFilename,
bool  bKeepOrginalFileName = false,
bool  bDoAutoFormat = false 
)
pure virtual

Saves the document using a new file name. This method will fail, if a stream has been loaded previously.

Parameters
rstrFilenameName of the new file
bKeepOrginalFileNameKeeps the original file name stored. This flag is needed to store a copy.
bDoAutoFormatEnable auto format tags on saved file.
Return values
RET_NOERRORFile saved
RET_REQUEST_FAILEDCould not save file

§ setFileName()

virtual void MQUALIFIER zeus::IXMLDocument::setFileName ( const IString rstrFileName)
pure virtual

Set the file name of the XML document.

Parameters
rstrFileName[IN]: File name.

§ useNamespace()

virtual void MQUALIFIER zeus::IXMLDocument::useNamespace ( const IString rstrPrefix,
const IString rstrNameSpace 
)
pure virtual

Sets the prefix for a specific name space. Use this method before querying data with X-Path.

Parameters
rstrPrefixPrefix to use
rstrNameSpaceName space

§ validate()

virtual Retval MQUALIFIER zeus::IXMLDocument::validate ( IXMLErrorReporter pReporter = NULL)
pure virtual

Validates the xml document. Te errors will be returned by the the error handler registered.

Parameters
pReporterOptional reporter instance
Return values
RET_NOERRORXML is ok
RET_INVALID_DATAXML is not valid.

The documentation for this class was generated from the following file:


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Tue Sep 13 2016 22:31:42