[fpc-devel] possible bug in TDOMNamedNodeMap.RemoveNamedItem
Alexander Todorov
alexx.todorov at gmail.com
Mon Mar 6 17:11:26 CET 2006
Hello folks,
I found that TDOMNamedNodeMap.RemoveNamedItem does not delete from
memory the specified Item. It just sets FParentNode := nil. In this
case the following doesn't work as expected :
//-------------------------
while Node.Attributes.Length > 0 do
Node.Attributes.RemoveNamedItem(Node.Attributes.Item[0].NodeName);
//-------------------------
// working example
while Node.Attributes.Length > 0 do
Node.Attributes.Delete(0);
//--------------------------
This loop continues forever being stuck at the first attribute of a xml node.
Is this a bug or it is by design?
More information about the fpc-devel
mailing list