Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Print out values of xml tags

 
James Howerton
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name of this question is read xml and set txtfields using combobox
Hello and Thank you in advance for any assistance.


System info:

netbeans,glassfish,MySQL

The Purpose of this post is:

I am trying to learn how to read an entire XML file and create an array that the selected index from a combo box will populate text Fields using the index to find the appropriate data.


The functionality of this code is:

I presently have a program that uses a combo box, a switch, and text fields set Text code to populate text fields according to the selected Item (the text) from a combo box.


My task is to build an XML file from the hard coded data (hundreds of set text statements. I have 14 blocks of data tags <keyName> each has a <name>

Code description

keycards.xml


My question is:

With my XMLReader.java I am trying to first just print out the values of the <name> . Will it be possible with this code? How can I get this to print the value of the <name>?
Thanks again.
-ceyesumma

Note:
………………………………………………………………………………………………

Code description

XMLReader.java

 
James Howerton
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. I found a good example and now It does work. I need to build a class to load the combobox.
thanks
 
James Howerton
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code to populate my combobox.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic