As you can see in the CXmlAttribute class, there's no member variable at all. This is because I'm confused as what variable to use. FYI, the value of the attribute can be of any type that is enumerated with eXmlAttributeType. It is actually being read as a string from xerces so my initial plan is to store the string value and just translate it into the correct type using one of the GetAttribute() method. But that is not really efficient and I better store it into the correct type. So any suggestion of what I should use? Templates? Void pointers? Thanks in advance.

The arguments to the various GetAttribute() member functions pass all information needed, so there is no need for the class to have any member variables.

The function that, for example, accepts a reference to float as the third argument will interpret the XML element(s) as a float (and return the value in that third argument).

Right 98% of the time, and don't care about the other 3%.

If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Well, that's true. But I kinda expect that the GetAttribute functions will only be used internally to set a member variable "mValue" that indicates the value of an attribute. That's because I want to minimize the overhead of parsing the tag for an attribute->converting the string from that parsed attribute using stringstream (yeah those GetAttribute functions are using stringstream to handle the conversion). So what I had in mind is parse the element once based on a tag's xercesc:OMElement object at the constructor (yea, just realized that I should've put the xercesc:OMElement& element as a parameter for the CXmlAttribute' ctor), then convert it to its type and store it into a variable called mValue (still dunno the type of this variable. a union of all those types? a template? or a void pointer? ). And afterwards, if the user wanted to extract this value, it can be done via a getter function GetValue().