This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

element name and cdata

 
James Howerton
Ranch Hand
Posts: 82
  • 0
  • 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: 13045
6
  • 0
  • 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
  • 0
  • 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: 20177
25
MySQL Database
  • 0
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic