XML problem

Hi ,
I have 2 xml files.

empl1.xml
-----------
<employees>
<employee id="100">
   <Name>name1</Name>
   <Dept>dept1</Dept>
   <Title>title1</Title>
</employee>
<employee id="101">
   <Name>name2</Name>
   <Dept>dept1</Dept>
   <Title>title2</Title>
</employee>
<employee id="102">
   <Name>name3</Name>
   <Dept>dept2</Dept>
   <Title>title3</Title>
</employee>
</employees> 

empl2.xml
----------
<employees> 
<employee id="100">
   <Name>name1</Name>
   <Dept>dept2</Dept>
   <Title>title1</Title>
</employee>
</employees>

Pl note that for <employee id="100"> , <Dept> is
different in 2 files. Rest everything is same. id
attribute in empl2.xml can be any id value from
empl1.xml(but its dynamic). empl1.xml can have any no
of <employee> entries with different id values. But
empl2.xml will have only 1 <employee> entry and
<Name>, <Dept> and <Title> in it can be different from
the corresponding ones in empl1.xml(based on matching
id). I want to write a XSL stylesheet which merges
these 2 XML documents. For a matching <employee> entry
in both files(based on id), the resulting XML document
will have <Name>, <Dept> and <Title> modified
according to that in 2nd file but rest of <employee>
entries should be same(from empl1.xml).

Any help on this problem will be much appreciated.

Regards
-mukul

Siemens Information Systems Ltd 
Tower (B), Plot 6A, Sector-18
HUDA Area, Gurgaon
Haryana -122 015, India


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Received on Wednesday, 25 April 2001 08:31:38 UTC