Generating xml dynamically

Hi there
SO I have a class that handles chunks of xml.
the issue is I am wanting these chunks to be defined externally of the xml handler class and rather passed to the class. for example

myXML.SECTION.HEALTH_MANAGMENT.CONTENT.GALLERY_OBJECT

I would like to make HEALTH_MANAGMENT a variable.

kinda like

public function XmlGallery(callTarget:XmlNode) {

myXML.SECTION.+callTarget+.GALLERY_OBJECT

if this makes sense.