Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

element name and cdata

 
James Howerton
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone tell me what has to be changed to get the element name and text of my targetElement?

I just get

internal frame openFrameCount= 1
start obj() type= guide
cmaj
name: null value: null
name: null value: null
name: null value: null
cmaj
name: null value: null
name: null value: null
name: null value: null

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you dont show the actual XML I can only guess that the Element has multiple Text nodes created by formatting.

Careful study of the marvelous table in the org.w3c.dom.Node JavaDocs is recommended.

Bill
Also please use code formatting as much as possible.
 
James Howerton
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I got the siblings I need but need a good method to produce the text node. Is there a standard method for this?

 
Paul Clapham
Sheriff
Pie
Posts: 20955
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, again, we don't see any XML to base an answer on. And your code is not particularly readable -- it would help if you posted it inside the Code tags, so it came out formatted.

But I'm going to assume that this "text node" you're referring to is probably the child node of the element you found. If indeed you did find an element.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic