The clear function in XmlDictionary and XmlList were both eagerly removing all elements of the rootnode even if those elements were not being parsed.
In object where the rootnode is shared running list.clear() was removing all elements of the rootnode.
This PR will fix this by only removing elements that have been parsed.
I also had to change the way SubTagDictionary is finding its rootnode by using the Nestable class.
fixes #23
Coverage increased (+0.03%) to 77.122% when pulling b1937f1e62f60e7c26e566b7d046a91a3302f93c on fix_clear into 66586f02da5660a87a4347e246dd76eac0bb29c4 on master.
The
clear
function inXmlDictionary
andXmlList
were both eagerly removing all elements of the rootnode even if those elements were not being parsed. In object where the rootnode is shared runninglist.clear()
was removing all elements of the rootnode. This PR will fix this by only removing elements that have been parsed. I also had to change the waySubTagDictionary
is finding its rootnode by using theNestable
class. fixes #23