• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXP-DOM Node Import Issue

 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi ,

I tried to parse a XML using JAXP DOM implementations and used getElementsByTagName() to get to a particular Node and



But the API has something like this "User data associated to the imported node is not carried over. " , But I dint even get the childNodes. Any body tried this before ? .

Alternatively , is there any way i can persist a particular Node( with node values) to a new Document ? Thanks.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's how you do it. I don't see any code where you test the number of children in the source node, so perhaps you are mistaken about the number of children it has.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


That's how you do it. I don't see any code where you test the number of children in the source node, so perhaps you are mistaken about the number of children it has.



Yup, but the documentNew.getChildNodes().item(0) returns null. I will double check it anyways. BTW user data(Node value) are not imported to new document ? because the main requirement i go with this approach is to get the Node value.Thanks Paul.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic