I'm just getting back to doing IDM development after a 2 year break.
I'm very rusty and am still learning all the new features in 3.5.

I have a node-set in a local variable and want to 'promote' the node set
into add-attr elements. As an example:

$tmp-xmldata is equal to the following:

<enrollment>
<career>
<plan>1</plan>
<plan>2</plan>
<term name="Summer2007">
<class>A</class>
<class>B</class>
</term>
</career>
</enrollment>

I would like to add it to the add document as an add-attr like this:

<add-attr attr-name="career">
<value>&lt;plan>1&lt;/plan>
&lt;plan>2&lt;/plan>
&lt;term name="Summer2007">
&lt;class>A&lt;/class>
&lt;class>B&lt;/class>
&lt;/term></value>
</add-attr>

Ultimately, I need to create something that can handle multiple <career>
elements in the variable and convert that to multiple <value> elements,
but I'd be happy to just get one working.

Any ideas on the best approach to accomplish this?

Also, something that had me stumped but finally figured out. When
taking xml data and pumping it into a node-set variable using xml-parse
and xml-serialize (I seemed to need both, but not sure why,) it seems to
want there to be only a single top level to the xml. I was tyring to
parse an xml fragment with two <career> elements (no top level
<enrollment> element) and was running into trouble.

Anyway, thanks for any guidance you can offer.

Luke