Multiple XML File Problem
I would like to limit the output of one XML file based on another XML file through styling.
The most basic example would be:
XML Main
<root>
<sale1>
<company_name>ABC corp</company_name>
<company_addr>123 East Main</company_addr>
<company_addr_city>123 East Main</company_addr_city>
<company_addr_state>123 East Main</company_addr_state>
<company_addr_zip>123 East Main</company_addr_zip>
<last_sale>100,000</last_sale>
<last_sale_year>2004</last_sale_year>
<last_sale_month>06</last_sale_month>
</sale1>
</root>
XML Limiter
<root>
<limiter>
<company_name/>
<last_sale/>
<last_sale_month/>
</limiter>
</root>
So looping though XML Main, I only want to output the columns that exist in XML Limiter. XML Limiter is dynamically generated, and will change with every submission. So I cannot hard code the value but must loop through both. There will be multiple base lever <sale> record to process through each one outputing the columns as listed in XML Limiter.
I have tried document(), key(), etc to accomplish. I can loop through both, access both pieces indepentantly, but CANNOT build an xpath statement to extract from XML Main based on an element in XML Limiter.
Thanks in advance.
|