Greetings.
I originally posted something on this problem on the XSLT thread because that was my original thought, but decided to have the question here instead. If it matters(which i don't think it does) this is an EDI214 transaction.
I have data in the format of:
AAAAAAAA*BBBBBBBBB^AAAAAAAA*BBBBBBBBB^AAAAAAAA*BBB BBBBBB^
Or more specifically a regular expression of:
(AAAAAAAA*BBBBBBBBB^) AAAAAAAA*BBBBBBBBB^
Where what is in parenthesis occurs 0 to many times. This string is coming across in an xml element and I need to transform it into this format:
<tag1>
<Field1> AAAAAAAA </Field1>
<Field2> BBBBBBBBB </Field2>
</tag1>
<tag1>
<Field1> AAAAAAAA </Field1>
<Field2> BBBBBBBBB </Field2>
</tag1>
<tag1>
<Field1> AAAAAAAA </Field1>
<Field2> BBBBBBBBB </Field2>
</tag1>
I think I have to use XSLT, because this is going into a biztalk solution and I canât change the schemas. I think i can create the xml using xslt, but i don't know how to parse the strings with it.
My new thought is this:
Doesn't the scripting functoid just output a string? If so, can I not build this string using
VB.NET or C# instead? In the above Field1 and Field2 are children tags of L11. In fact the Field1 and Field2 above are as such:
<L11>
<L1101></L1101>
<L1102></L1102>
</L11>
Can't I build this structure in a
VB.NET script and drag the functoid output to the parent or the <L11> output field? I have tested the code I'm using in a sample
VB.NET project and I am getting the proper output. When I do it, I get the error: "The element L11 has an invalid structure".
Any ideas for first whether I can do what I'm trying to do and if not, what I can do in XSLT to make it work. I can post the
VB.NET code if it is needed.
Thanks,
Brian