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:


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.


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()
    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 =
      else LOCAL.value = "";
      LOCAL.myStruct = structNew();
      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.


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