# Good abbreviations for XML … things

I've never been very good at maintaining a coherent bunch of variable names for interfacing with XML files because I never name the variables in my interfaces the same way across my source.

There are Elements, Attributes, Documents, NodeLists, Nodes, DocumentFragments and other stuff. What's a good scheme for keeping track of this stuff as variables?

Is there a standard in regard to Hungarian notation? Do you even put anything signifying that the data is actually XML, is this bad practice?

Also, what is the difference between the way you name your constants (signifying Namespaces, Elements and Attribute Names) and your variables (signifying Namespaces, Elements, Attributes, Nodes, Node Lists and Documents)

In the latter case, I defined constants to refer to the various elements and attributes, to keep literal values out of my code. Constants for elements all start with EL_, attributes all start with AT_, and namespaces all start with NS_. Those are really the only three things that I'm likely to access by name. If there are multiple classes that need to access the same XML structures, the constants get moved to a common support class.
docNode, rootElem, customAttr