Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Grouped xml data in a table.

Avatar

Level 1

Hi,

Given the following xml (which I can change if necessary)

<?xml version="1.0" encoding="utf-8"?>
<Funds>
  <Group name="Specialist portfolios">
    <Fund>ACME Industrial Fund A</Fund>
    <Fund>ACME Resources Fund A</Fund>
    <Fund>ACME Value Fund A</Fund>
    <Fund>ACME Financials Fund A</Fund>
    <Fund>ACME Growth Fund A (formerly Capital Growth)</Fund>
    <Fund>ACME Small Cap Fund A</Fund>
    <Fund>ACME Gold and Precious Metals Fund A</Fund>
  </Group>
  <Group name="General equity portfolios">
    <Fund>ACME Prosperity Fund A</Fund>
    <Fund>ACME Equity Fund A (formerly Wealthbuilder)</Fund>
    <Fund>ACME ALSI 40 Fund A</Fund>
    <Fund>ACME Multi-Manager Equity Fund A1</Fund>
    <Fund>ACME Index Fund R</Fund>
    <Fund>ACME Multi-National Fund A</Fund>
    <Fund>ACME Multi-Manager All Stars Equity FOF A</Fund>
    <Fund>ACME ACME Nationbuilder Fund A</Fund>
    <Fund>ACME Shari'ah Equity Fund A</Fund>
  </Group>
</Funds>

I am trying to build this into a table with a section for each group, and then the list of funds underneath.

I am able to get the section header rows to work by using the binding expression:$.Group[*] for the HeaderRow[1]

I cannot seem to get the fund list under each group to work though.

I have tried $.Group[*].Fund[*].name, but that will clearly confuse the table as there are multiple levels of items. The warning suggests using relative binding references but I cannot find documentation for these. I don't know what to make it relative to. The section doesn't have any binding expressions.

Any help would be greatly appreciated for our evaluation.

Thanks

Regards
Craig.

5 Replies

Avatar

Level 10

I find it easier to use my own structure instead of a table for this binding exercises. I created a sample to show you.

Paul

Avatar

Level 1

Hi,

Thanks for the response.

It does beg the question why have tables with sections if you can't use data with sections in them.

Your approach is fine, but rather more 'manual' than I had hoped.

Thanks

Regards

Craig.

Avatar

Level 1

Hi Paul,

I am now trying exactly the same thing (using sub-forms) with data returned from a web service.

The web service returns a list of strings, though I will use complex objects later.

I can't seem to get the sub-form to bind to the list correctly using.

It will only bind to the message result, not to the list within the message result using the Import/Export bindings.

The web service is .net

string[] GetSomeData() ...

Is there some samples using web services where heirarchies can be built?

Regards

Craig.

Avatar

Level 10

I am not saying it cannot be done with a table ...I just prefer not to use them unless I have to.

Not all forms are bound to a data source ....many people use them for formatting of a print form.

Paul

Avatar

Level 10

The binding properties are set up to bind to what is returned from the web service. It sounds to me like you are returning a single string (which happens to contain xml that represents the structure of the form). The product connot inspect the internals of that string (the WSDL only describes a single string being returned). In these case you can have a single multiline field that you can bind the result to, then load the xml data into the data dom your self. You still cannot bind to it but you can manipulate the datadom to populate your fields (basically doing the binding yourself).

Hoep that helps

Paul