• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to filter xml output from two xml files

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a problem. I have two xml files. file no. 1 name account.xml
the content is


another xml file named: relation.xml. the content is

<ROWSET>
<ROW> <CustomerNo>11112222333301</CustomerNo> <AccountNo>00001111222233330001</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333303</CustomerNo> <AccountNo>00001111222233330003</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333305</CustomerNo> <AccountNo>00001111222233330005</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333307</CustomerNo> <AccountNo>00001111222233330007</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333309</CustomerNo> <AccountNo>00001111222233330009</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333311</CustomerNo> <AccountNo>00001111222233330011</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333313</CustomerNo> <AccountNo>00001111222233330013</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333315</CustomerNo> <AccountNo>00001111222233330015</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333317</CustomerNo> <AccountNo>00001111222233330017</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333319</CustomerNo> <AccountNo>00001111222233330019</AccountNo> </ROW>
<ROW> <CustomerNo>11112222333321</CustomerNo> <AccountNo>00001111222233330021</AccountNo> </ROW>
</ROWSET>
</ROWSET>



as you can see that not all the account is in the relation.xml

I need to write an xsl file to generate output only those account that do not exist in the relation.xml file
My output should be as shown below.

<ROWSET>
<ROW> <AccountNo>00001111222233330002</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330004</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330006</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330008</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330010</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330012</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330014</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330016</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330018</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330020</AccountNo> </ROW>
<ROW> <AccountNo>00001111222233330022</AccountNo> </ROW>
</ROWSET>
</ROWSET>




can anyone help me
thanks
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have no idea what you have done so far, and we have no idea how much XSLT you know. So it's pretty hard to do much in such a state of ignorance. However you can use the XPath document() function to access as many documents as you like in an XSLT -- does that help?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic