Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

dom problem

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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--
 
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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--
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The name is fine. And thanks for sharing the solution with us!
 
mooooooo ..... tiny ad ....
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic