NiXPSObjects::NOContentStreamNavigator Class Reference

#include "NOContentStreamNavigator.h"

List of all members.

Public Member Functions

void getNodeInfo (NCommon::UInt32 &lPos, NCommon::UInt32 &lLen)
NCommon::UInt32 getNumberOfChilds () const
bool toChild (const NCommon::UInt32 pNum)
bool toChild (const NCommon::UTF8String &pString, const bool pCaseSensitive=true, const bool pIgnorePrefix=true)
bool toSibling ()
const NCommon::UTF8String getName () const
bool hasAttributeValue (const NCommon::UTF8String &pAttributeName) const
const NCommon::UTF8String getAttributeValue (const NCommon::UTF8String &pAttributeName) const
bool setAttributeValue (const NCommon::UTF8String &pAttributeName, const NCommon::UTF8String &pValue)
bool addAttribute (const NCommon::UTF8String &pKey, const NCommon::UTF8String &pValue)
bool toAttributeValue (const NCommon::UTF8String &pAttributeName)
bool hasCharacterData () const
const NCommon::UTF8String getCharacterData () const
bool insertChild (const NCommon::UTF8String &pName, NCommon::UInt32 pPosition, bool pToChild)
bool insertAsChild (const NCommon::UTF8String &pXML)
bool insertAsChild (NOContentStreamNavigator &pNav)


Detailed Description

Use an NOContentStreamNavigator to navigate and manipulate an XML content stream
Examples:

docexample_nocontentstream.cpp.


Member Function Documentation

void NiXPSObjects::NOContentStreamNavigator::getNodeInfo ( NCommon::UInt32 lPos,
NCommon::UInt32 lLen 
)

Get Position and Length of the current node

Parameters:
lPos On return, the position of the current node
lLen On return, the length of the current node

NCommon::UInt32 NiXPSObjects::NOContentStreamNavigator::getNumberOfChilds (  )  const

Get the number of child nodes.

Examples:
docexample_nocontentstream.cpp.

bool NiXPSObjects::NOContentStreamNavigator::toChild ( const NCommon::UInt32  pNum  ) 

Navigate to child node at given index

Parameters:
pNum the index of the node to navigate to
Examples:
docexample_nocontentstream.cpp.

bool NiXPSObjects::NOContentStreamNavigator::toChild ( const NCommon::UTF8String pString,
const bool  pCaseSensitive = true,
const bool  pIgnorePrefix = true 
)

Navigate to child node with given name, optionally ingnoring case and/or namespace

Parameters:
pString The name of the node to go to
pCaseSensitive Behave case sensitive. Defaults to true (case sensitive)
pIgnorePrefix Ignore namespace prefixes. Defaults to true (ignore namespace prefixes)

bool NiXPSObjects::NOContentStreamNavigator::toSibling (  ) 

Navigate to next sibling

Returns:
True upon success, false if there is no next sibling

const NCommon::UTF8String NiXPSObjects::NOContentStreamNavigator::getName (  )  const

Return the name of the current node as a UTF8String.

bool NiXPSObjects::NOContentStreamNavigator::hasAttributeValue ( const NCommon::UTF8String pAttributeName  )  const

Test for the presence of the given attribute

Parameters:
pAttributeName The attribute name to test for

const NCommon::UTF8String NiXPSObjects::NOContentStreamNavigator::getAttributeValue ( const NCommon::UTF8String pAttributeName  )  const

Get the value of an attribute of the current node

Parameters:
pAttributeName The name of the attribute to get the value of
Returns:
The value of the attribute as a (const) UTF8String

bool NiXPSObjects::NOContentStreamNavigator::setAttributeValue ( const NCommon::UTF8String pAttributeName,
const NCommon::UTF8String pValue 
)

Set the value of an attribute in the current node

Parameters:
pAttributeName The name of the attribute to set the value of
pValue The string to set the attribute value to

bool NiXPSObjects::NOContentStreamNavigator::addAttribute ( const NCommon::UTF8String pKey,
const NCommon::UTF8String pValue 
)

Adds an attribute to the current node

Parameters:
pAttributeName The name of the attribute to set the value of
pValue The string to set the attribute value to

bool NiXPSObjects::NOContentStreamNavigator::toAttributeValue ( const NCommon::UTF8String pAttributeName  ) 

Navigate to the attribute value

Parameters:
pAttributeName The name of the attribute to set the value of

bool NiXPSObjects::NOContentStreamNavigator::hasCharacterData (  )  const

Check to see if the current element has character data.

const NCommon::UTF8String NiXPSObjects::NOContentStreamNavigator::getCharacterData (  )  const

Get the character data for the current node as a UTF8String.

bool NiXPSObjects::NOContentStreamNavigator::insertChild ( const NCommon::UTF8String pName,
NCommon::UInt32  pPosition,
bool  pToChild 
)

Inserts a child in the current node

Parameters:
pName The name of the element as a UTF8String
pPosition The position of this inserted element
pToChild Navigate to this freshly created child, or not
Returns:
Whether the operation was successful

bool NiXPSObjects::NOContentStreamNavigator::insertAsChild ( const NCommon::UTF8String pXML  ) 

Inserts XML as a child of the current node

Parameters:
pXML The XML to insert as a UTF8String
Returns:
Whether the operation was successful
Examples:
docexample_nocontentstream.cpp.

bool NiXPSObjects::NOContentStreamNavigator::insertAsChild ( NOContentStreamNavigator pNav  ) 

Inserts XML at the cursor of another content stream navigator as a child of the node at the cursor of this content stream navigator

Parameters:
pNav the content stream navigator pointing to the XML node to insert as a child in the current content stream
Returns:
Whether the operation was successful


The documentation for this class was generated from the following files:
Generated on Mon Sep 24 15:01:43 2007 for NiXPS Library by  doxygen 1.5.3