Merging xml data by ID

  • Thread starter max.schoebinger
  • Start date
M

max.schoebinger

Hi all,

I am facing the following problem in Infopath 2003: I want to display
a table of employees together with their name and business-unit name.
The data is coming from an XML file that has the following structure:

<company>
<employees>
<employee>
<name>Max</name>
<age>31</age>
<business-unit-id>3</business-unit-id>
</employee>
</empolyees>
<business-units>
<business-unit>
<id>3</id>
<name>Engineering</name>
</business-unit>
</business-units>
<company>

My problem now is: How can I associate the employee "Max" with his
business unit "Engineering". To be able to do so I have to do a
matching of the <business-unit-id> with the corresponding element <id>
in the business units for each employee.

The outcome should be a table like the following:

Name Age BU
----------------------------------------------
Max 31 Engineering
Maria 27 Administration
Michael 23 Management

Is this feasible in Infopath 2003?

BTW: I have no influence on the structure of the XML file.

Thanks,

Max
 
M

max.schoebinger

Hi Shiva,

thanks for your reply. Unfortunately I don't have the option to add
code to the infopath form, as then different QA procedures would apply
to this form, which will add a huge amount of overhead.
Is this also feasible without adding macros? I was hoping to achieve
this by adding XPath expressions, but I have no experience with XPath
and had no success...

Any hint is highly appreciated!

Thanks,

Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top