BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


JavaScript
x++ beta 0.2 release (includes ISAPI filter/interpreter)
HTTP File Commander
XML Ticker
Fading Ticker
How to understand the flow of control in XLST
Begginers, search the Bible
JavaScript Ticker (using Tabular Data Control)
-postfix.aspx>Infix <> Postfix
Nested Tables And Data Island
XML Data Traversal
TrimWhiteSpace
Two Tier Data Islands with Expanding/Collapsing Child elements.
Escape special characters using JavaScript and regular expressions
Sticky Table Headers
Dynamically Filling HTML Select Box from XML Data Island using Javascript.
XML Basics Handbook


 
 

 LAMP >>


By Pedro Gil
First Posted 05/24/2002
Times viewed 263

Display of Hierarchical Data Islands


Summary How to Bind Data Fields to a Hierarchical Data Island

I've seen this question been made several times, so one more just trigered this snippet.

I don't think this is very advanced snippet, but then it will I hope avoid me to have to write it down a couple of times more :-)

When you have a nested xml, and you want to bind it to data fields, you have to build your HTML in a nested way to.

Imagine that you have a xml that look like this...

<root>
  <gran-parent>
  <nameGP>GP</nameGP>
  <parent>
      <nameP>P</nameP>
   <child>
    <nameC>C</nameC>
   </child>
    </parent>
  </gran-parent>
</root>

So for you to bind this xml in data-bound table you will have to recreate the nesting of the xml file in the data-bound table.

somthing like this:

 <table datasrc=#dsoData >
  <tr>
   <td>
    <input datafld=nameGP/>
   </td>
   <td>
    <table datasrc=#dsoData datafld=parent>
     <tr>
      <td><input datafld=nameP/></td>
      <td>
       <table datasrc=#dsoData datafld=child>
        <tr>
         <td><input datafld=nameC/></td>
        </tr>
       </table>
      </td>
     </tr>
    </table>
   </td>
 </table>

Hope this make this clear :-)

Pedro Gil

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

 LAMP >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML