[fpc-pascal] TDOMElement and multiple attributes
nc-gaertnma at netcologne.de
Fri Mar 18 20:16:08 CET 2011
On Fri, 18 Mar 2011 17:08:49 +0100 (CET)
michael.vancanneyt at wisa.be wrote:
> On Fri, 18 Mar 2011, Reimar Grabowski wrote:
> > On Fri, 18 Mar 2011 16:02:10 +0100
> > Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> >> Why do you need to order them?
> > I don't need to, I just want to and the reason is simply aesthetics. So no big deal that it is not possible.
> > Btw is there any comprehensible reason behind the order which SetAttribute uses? It is not alphabetical and not the order of the SetAttribute calls.
> Probably determined by hashvalue or the AVL tree order.
TDOMNamedNodeMap does not use hash nor AVL tree.
It uses a binary search in TDOMNamedNodeMap.Find to find the insert
position, so it should be alphabetically sorted.
On a first glance the code looks ok.
Maybe Reimar can give an example when it does not work.
More information about the fpc-pascal