Low Level Biztalk schema creation



I have been using biztalk for a few months now, and have learned the in's and out of basic and intermediate level Project creation. Today however I have noticed something at the Beginner level concepts that I must have missed (schema creation). In a project I created using a Schema named "NewSchema" I created a screen record with id and parentid attributes, msg element, and four records named A-D, which are meant to be elements, but with an attribute named ChildID.


I had originally done this project in a C# program I had written to better teach myself how to iterate through XML elements. Now I have adapted the program to biztalk where I noticed elements cannot have "attributes"? To work around this A-D would have to be records with attributes, then I'd have to make a child element of the same name of the record for each A-D record. Are elements with attributes possible in biztalk? I'm surprised I have never come across this before.


It'll work if I do this:



<ns0:Root xmlns:ns0="http://ift.tt/1B5OOCs">
<Screen ID="ID_0" ParentID="ParentID_1">
<MSG>MSG_0</MSG>
<A ChildID="ChildID_0">
**<A>Hello World</A>**
</A>
<B ChildID="ChildID_0" />
<C ChildID="ChildID_0" />
<D ChildID="ChildID_0" />
</Screen>
</ns0:Root>


But can I create my project this way in biztalk?:



<ns0:Root xmlns:ns0="http://ift.tt/1B5OOCs">
<Screen ID="ID_0" ParentID="ParentID_1">
<MSG>MSG_0</MSG>
**<A ChildID="ChildID_0">
Hello World
</A>**
<B ChildID="ChildID_0" />
<C ChildID="ChildID_0" />
<D ChildID="ChildID_0" />
</Screen>
</ns0:Root>

No comments:

Post a Comment