rssullivan
Programmer
I'm new to XML and would like to know the best way/tool to split an element if a value based on the size of a node value. I'm going to have hundreds of this type of situation, so I would like to find a programmatic solution if possible.
For example, in the following XML I need to create a new <threads> element if the <note> value is to large:
/* I need to change this: */
<threads>
<ID>7399</ID>
<acctID>51</acctID>
<entered>2011-05-14T12:56:06.000-07:00</entered>
<entryType>8</entryType>
<note>I am too big...now i'm not....
<seq>1</seq>
</threads>
/*..to two elements: */
<threads>
<ID>7399</ID>
<acctID>51</acctID>
<entered>2011-05-14T12:56:06.000-07:00</entered>
<entryType>8</entryType>
<note>I am too big...
<seq>1</seq>
</threads>
<threads>
<ID>7399</ID>
<acctID>51</acctID>
<entered>2011-05-14T12:56:06.000-07:00</entered>
<entryType>8</entryType>
<note>now i'm not....
<seq>1</seq>
</threads>
Thank you very much!
rssullivan
For example, in the following XML I need to create a new <threads> element if the <note> value is to large:
/* I need to change this: */
<threads>
<ID>7399</ID>
<acctID>51</acctID>
<entered>2011-05-14T12:56:06.000-07:00</entered>
<entryType>8</entryType>
<note>I am too big...now i'm not....
<seq>1</seq>
</threads>
/*..to two elements: */
<threads>
<ID>7399</ID>
<acctID>51</acctID>
<entered>2011-05-14T12:56:06.000-07:00</entered>
<entryType>8</entryType>
<note>I am too big...
<seq>1</seq>
</threads>
<threads>
<ID>7399</ID>
<acctID>51</acctID>
<entered>2011-05-14T12:56:06.000-07:00</entered>
<entryType>8</entryType>
<note>now i'm not....
<seq>1</seq>
</threads>
Thank you very much!
rssullivan