TXmlEngNamespace Class Reference

Link against: xmlengineDOM.lib


#include <xmlengnamespace.h>

Inherits TXmlEngNode.


Detailed Description

Represents existing namespace declaration in DOM tree OR namespace node returned in RXmlEngNodeSet as a result of some XPath expression.

All elements and attributes may have a namespace instance associated. Once put in element, a namespace declaration (instance of TXmlEngNamespace) may be referred to by all attributes and descentants of the element (unless prefix that this namespace-to-prefix binding uses is overriden somewhere below in the document tree)

General rules of namespace handling:

Note:
Namespace nodes that are result of XPath expression have following restrictions:
Dll XmlEngineDOM.lib
Since:
S60 v3.1

Public Member Functions

  TXmlEngNamespace ()
  Default constructor.
IMPORT_C TPtrC8  Uri () const
  /** Get namespace URI
IMPORT_C TPtrC8  Prefix () const
  Get namespace prefix.
IMPORT_C TBool  IsDefault () const
  Check if namespace is default.
IMPORT_C TBool  IsUndefined () const
  Check if namespace is undefined.

Protected Member Functions

TPtrC8  NamespaceUri ()
  Workaround to avoid misuse of TXmlEngNode::NamespaceUri() method, which should not be applied to TXmlEngNamespace node.
  TXmlEngNamespace (void *aPtr)
  Constructor.

Friends

class  TXmlEngElement
class  TXmlEngNode

Constructor & Destructor Documentation

TXmlEngNamespace::TXmlEngNamespace  )  [inline]
 

Default constructor.

Since:
S60 v3.1
TXmlEngNamespace::TXmlEngNamespace void aPtr  )  [inline, protected]
 

Constructor.

Since:
S60 v3.1
Parameters:
aPtr  Namespace pointer

Member Function Documentation

IMPORT_C TBool TXmlEngNamespace::IsDefault  )  const
 

Check if namespace is default.

Since:
S60 v3.1
Returns:
Whether it is a definition of default namespace TRUE -- is a default namespace (no prefix) FALSE -- not a default namespace (bound to prefix) or empty TXmlEngNamespace(NULL) instance
IMPORT_C TBool TXmlEngNamespace::IsUndefined  )  const
 

Check if namespace is undefined.

Since:
S60 v3.1
Returns:
Whether the namespace is undefined
A node's namespace is undefined if no namespace declaration associated with it.
Note:
Same as TXmlEngNode::IsNull()
TPtrC8 TXmlEngNamespace::NamespaceUri  )  [inline, protected]
 

Workaround to avoid misuse of TXmlEngNode::NamespaceUri() method, which should not be applied to TXmlEngNamespace node.

Since the name of the inherited method from TXmlEngNode is too similar to TXmlEngNamespace::Uri(), NamespaceUri() is disabled for direct use. If NamespaceUri() is called on the TXmlEngNamespace object that is downcasted to TXmlEngNode, then NamespaceUri()'s result equals to result of Uri() method.

Since:
S60 v3.1
Returns:
NULL
IMPORT_C TPtrC8 TXmlEngNamespace::Prefix  )  const
 

Get namespace prefix.

Since:
S60 v3.1
Returns:
prefix that is bound in the namespace declaration or NULL string for default namespace or if no binding exist

Reimplemented from TXmlEngNode.

IMPORT_C TPtrC8 TXmlEngNamespace::Uri  )  const
 

/** Get namespace URI

Since:
S60 v3.1
Returns:
Namespace URI string
Note:
"" is never returned - it is replaced with NULL
For TXmlEngNamespace(NULL) or namespace undeclaration (xmlns=""), which are treatet as undefined namespace returns NULL, otherwise result is not a NULL string and not a "" (empty string).

Friends And Related Function Documentation

friend class TXmlEngElement [friend]
 
friend class TXmlEngNode [friend]
 

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

Copyright © Nokia Corporation 2001-2007
Back to top