[Issue 2979] Xml tags with only attributes return as without attributes ElementParser.parse

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 15 06:50:39 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2979





--- Comment #4 from hed010gy <y0uf00bar at gmail.com>  2009-05-15 06:50:39 PDT ---
Now that I think about it a little, passing a copied tag back is very,very
important.  The user call back can hold references to all the Elements and Tag
objects that can be assumed not to be further modified by the parser. Make them
and drop them freely and let the GC do its business. A new tag needs to be
created with every element anyway.

I did try once the idea of making a parser that kept a dictionary of elements,
so that there was only actual real copy of the element string name, and all
element tags referenced it. Each time a new element was parsed, a look up was
done on the table, and the reference returned , or a new entry made.  Too much
work.

The concept of having multiple copies of the same element string in the XML DOM
seems a waste, but I have learned to ignore it, and there is always more
memory.  Another memory / time / code tradeoff.  The compressibility of XML by
generic compression tools like 7zip is amazing.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list