well formed XML? XMLConverter Plugin

Happy holidays!

I have a situation where I'm using the XMLConverter plugin and most of
the time it does what I need to but I have a situation where the DBA
will be updating a large amount of data and the DBA says he needs
"well formed" XML to make his life easier.

When I pass a bean to the XMLConverter it generates:
<field1> value </field1>

DBA says he needs:

<record>
   <fieldname>field1</fieldname>
   <fieldvalue>value</fieldvalue>
</record>

So basically and array of structures? Is there an easy way to change a
bean to an array of structures and then pass that to the XMLConverter
plugin giving me "well formed" XML?

Check this http://anythingtoxml.riaforge.org/ might helpful for you.

Thanks

The XMLConverter plugin does this just fine, the problem was my object
going into the plugin. I just had to change my data from an array of
structs. I just wrote a function to do what I wanted.

  public array function toArrayOfStructs()
  {
    LOCAL.myArray=ArrayNew(1);
    for(LOCAL.x=1; LOCAL.x lte ArrayLen(getMetaData(THIS).properties);
LOCAL.x = LOCAL.x + 1)
    {
      if(isDefined(getMetaData(THIS).properties[LOCAL.x].name)) value =
evaluate(getMetaData(THIS).properties[x].name);
      else LOCAL.value = "";
      LOCAL.myStruct = structNew();
      structInsert(LOCAL.myStruct,"Fieldname",getMetaData(THIS).properties[LOCAL.x].name);
      structInsert(LOCAL.myStruct,"Fieldvalue",value);
      ArrayAppend(LOCAL.myArray, LOCAL.myStruct);
    }
    return LOCAL.myArray;
  }

So in my model I pass the bean and run it through the function and
then to the injected XML plugin.

XMLConverter.toXML(ARGUMENTS.bean.toArrayOfStructs())

If anyone has better ideas, I'd love to hear them.

Thanks.

Jonathan