Unicorn XML Toolkit
Version 1.50.00

Namespace Dom
Class INamedNodeMap

class INamedNodeMap {
public:
    int GetLength();
public:
    XNode GetNamedItem(const WCHAR *pszName);
    XNode SetNamedItem(INode *pArg);
    XNode RemoveNamedItem(const WCHAR *pszName);
    XNode Item(int nIndex);
    };
typedef XRefCnt<INamedNodeMap> XNamedNodeMap;

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.50.00
Author:
Alexey Gokhberg
See Also:
INode
Function Summary
int GetLength ();
����������Returns the number of nodes in this named node map.
XNode GetNamedItem (const WCHAR *pszName);
����������Returns the node with the name specified by pszName in this named node map.
XNode SetNamedItem (INode *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 WCHAR *pszName);
����������Removes the node with the name specified by pszName from this named node map.
XNode Item (int nIndex);
����������Returns the node in this named node map at the index specified by nIndex .

Function Detail

GetLength

int GetLength();

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

XNode GetNamedItem(const WCHAR *pszName);

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

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

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

SetNamedItem

XNode SetNamedItem(INode *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.

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

This method is not supported by XDM.

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

RemoveNamedItem

XNode RemoveNamedItem(const WCHAR *pszName);

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

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

This method is not supported by XDM.

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

Item

XNode Item(int nIndex);

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.50.00


This document was created using Unicorn DOC++.

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