Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dom problem

 
prat narang
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi group,
i've one dome application which takes two xml files as input, say X1 and X2. This application picks a particular node from X2 and replace it in X1 and then write a new X3.xml file.

xml files are
X1
<?xml version="1.0" encoding="UTF-8"?>
<book>
<constructed-response id="cr.5.501">
<constructed-response-group>
<constructed-response-item id="cri.5.40">
<question></question>
<solution></solution>
</constructed-response-item>
</constructed-response-group>
</constructed-response>
</book>
X2
<?xml version="1.0" encoding="utf-8"?>
<book id="book_inter">
<constructed-response id="cr.5.26">
<constructed-response-group>
<constructed-response-item id="cri.5.40" where.from="sub2.5.1.1.2">
<solution item-sequence-number="4" identifier-no="cri.5.40">
<solution-step>
<equation id="eq.5.86">prateek</equation>
</solution-step>
<correct-answer identifier-no="cri.5.40">
<equation id="eq.5.87">narang</equation>
</correct-answer>
</solution>
</constructed-response-item>
</constructed-response-group>
</constructed-response>
</book>
and the final file which i am getting
<?xml version="1.0" encoding="UTF-8"?>
<book>
<constructed-response id="cr.5.501">
<constructed-response-group>
<constructed-response-item id="cri.5.40">
<question/>

<solution identifier-no="cri.5.40" item-sequence-number="">
<solution-step>
<equation id="">prateek</equation>
</solution-step>
<correct-answer identifier-no="">
<equation id="">narang</equation>
</correct-answer>
</solution></constructed-response-item>
</constructed-response-group>
</constructed-response>
</book>
u can easily see that the value of few attributes are missing in the result file. i want the attribute values to in the result file. could anyone help me to find out that where i am missing the point.
thank you
--prateek--
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"true adonis",
We don't have many rules at JavaRanch, but we do have our naming policy which your obviously fictious name is in violation of. Please head overhere and change yours, pronto. Thanks!
 
prat narang
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i've got the solution for my problem. that was xerces bug..with the xerces 2 result is according to out need.
and i think now my name is not violating the group's code.
--prateek--
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name is fine. And thanks for sharing the solution with us!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic