The name of this question is Reading xml
Hello and Thank you in advance for any assistance.
System info:Netbeans
netbeans,glassfish,MySQL
The Purpose of this post is:
learn how to read XML into program.
The functionality of this code is:
To use the stack.push() to put XML elements in it and output XML elements System.out.println
My question is:
I do not understand stack.push(). It says it found the zooinventory.xml but the SAXModelBuider.java is not putting them on the stack.
The errors related to this code are:
This code is pretty difficult to understand... that setProperty method is impossible.
For example, if the method starts with "add", what ever happens? As far as I can tell, nothing.
James Howerton
Ranch Hand
Joined: Mar 14, 2009
Posts: 82
posted
0
I apologize. I did not see the XML forum.
The program is an example from a book. I thought the class was responsible for putting elements from the XML on the stack. It has several more classes. I was under the impression that it works sense everything compiled. I was trying to find out if it would run but it starts by saying nothing is on the stack. I will continue working with it to see if I can figure out how it works.
I'll look for the XML forum I did not see it.
Thanks
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12612
posted
0
It's the one that starts with "XML"--the post has already been moved.
Let this be a reminder--just because something compiles doesn't mean it does what we want!
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 11689
posted
0
The program is an example from a book.
If that is indeed a direct quote from the book, you should demand your money back. Not only does it have the errors various ranchers have pointed out, it is needlessly complicated for capture of SAX event data.