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?
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to