Unicorn XML Toolkit
Version 1.00.00

Namespace Dom
Class INamedNodeMap

class INamedNodeMap: virtual public CInterface {
public:
    INamedNodeMap();
    virtual ~INamedNodeMap();
public:
    virtual int GetLength() = 0;
public:
    virtual XNode GetNamedItem(const CString &strName) = 0;
    virtual XNode SetNamedItem(const XNode &pArg) = 0;
    virtual XNode RemoveNamedItem(const CString &strName) = 0;
    virtual XNode Item(int nIndex) = 0;
    };

The collection of nodes that can be accessed by name.

This class implements the C++ binding for the NamedNodeMap interface specified by DOM.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
INode
Constructor/Destructor Summary
INamedNodeMap ();
����������Constructs the named node map.
~INamedNodeMap ();
����������Destroys the named node map.

Function Summary
int GetLength ();
����������Returns the number of nodes in this named node map.
XNode GetNamedItem (const CString &strName);
����������Returns the node with the name specified by strName in this named node map.
XNode SetNamedItem (const XNode &pArg);
����������If the node with the same name as the node specified by pArg already exists in this named node map, replaces that node with pArg ; otherwise adds the node specified by pArg to this named node map.
XNode RemoveNamedItem (const CString &strName);
����������Removes the node with the name specified by strName from this named node map.
XNode Item (int nIndex);
����������Returns the node in this named node map at the index specified by nIndex .

Constructor/Destructor Detail

INamedNodeMap

INamedNodeMap();

Constructs the named node map.

~INamedNodeMap

virtual ~INamedNodeMap();

Destroys the named node map.

Function Detail

GetLength

virtual int GetLength() = 0;

Returns the number of nodes in this named node map.

This method implements the C++ binding for the length attribute specified by DOM.

Returns:
the number of nodes in this named node map

GetNamedItem

virtual XNode GetNamedItem(const CString &strName) = 0;

Returns the node with the name specified by strName in this named node map.

This method implements the C++ binding for the getNamedItem operation specified by DOM.

Parameters:
strName - the node name
Returns:
the node with the specified name in this named node map, or NULL if there is no such node

SetNamedItem

virtual XNode SetNamedItem(const XNode &pArg) = 0;

If the node with the same name as the node specified by pArg already exists in this named node map, replaces that node with pArg ; otherwise adds the node specified by pArg to this named node map.

This method implements the C++ binding for the setNamedItem operation specified by DOM.

Parameters:
pArg - the node to add
Returns:
the node replaced, if the replacement took place; NULL otherwise

RemoveNamedItem

virtual XNode RemoveNamedItem(const CString &strName) = 0;

Removes the node with the name specified by strName from this named node map.

This method implements the C++ binding for the removeNamedItem operation specified by DOM.

Parameters:
strName - the name of the node to remove
Returns:
the node removed

Item

virtual XNode Item(int nIndex) = 0;

Returns the node in this named node map at the index specified by nIndex .

This method implements the C++ binding for the item operation specified by DOM.

Parameters:
nIndex - the node index (zero-based)
Returns:
the node in this named node map at the specified index

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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