Originally posted by Joon Park:
Hello,
as Ajith mentioned in his reply, to check DOMAPI as solution to your query.
I would simply add to it by saying u can use:
NodeList list = doc.getElementsByTageName("Menu");
to each Menu object u can then ask for its childNodes i.e.
NodeList children = Menu.getChildNodes();
Hope this helps,
I'm new to XML processing in Java and I need some help. I have following XML file that I want to extract a vector of store object from:
<CHAINS>
--<STORE>
----<LOCATION>USA</LOCATION>
----<REVENUE>120000</REVENUE>
----<MENU>
------<ITEM>Big Burger</ITEM>
------<ITEM>Taco Salad</ITEM>
------<ITEM>Huge Drink</ITEM>
----</MENU>
--</STORE>
--<STORE>
----<LOCATION>CAN</LOCATION>
----<REVENUE>90000</REVENUE>
----<MENU>
------<ITEM>Big Burger</ITEM>
------<ITEM>French Toast</ITEM>
----</MENU>
--</STORE>
--<STORE>
----<LOCATION>JPN</LOCATION>
----<REVENUE>150000</REVENUE>
----<MENU>
------<ITEM>Big Burger</ITEM>
------<ITEM>Taco Salad</ITEM>
------<ITEM>Miso Soup</ITEM>
------<ITEM>Sushi Salad</ITEM>
------<ITEM>Huge Drink</ITEM>
----</MENU>
--</STORE>
.
.
.
</CHAINS>
How do I go about doing this? I was able to retrieve locations and revenues from it somehow and built a vector of store object, but I couldn't figure out how to retrieve Menu items (Menu items are different from location to location). I hope there is easier way to getting store object. Thanks in advance for your help.
[This message has been edited by Joon Park (edited July 29, 2001).]
Originally posted by Rohini Sulatycki:
Hello all,
I just received my results and I passed with 147/155 (94.8%). I would like to thank everybody on this group. I have mostly been a silent member of this group but always made sure to look up the latest topics everyday.
Here are the details:
Registration Number: g5adtt0bd7
Site: ksa
Grade: P
Score: 147
Comment: This report shows the total points that could have been
awarded in each section and the actual number of points you were
awarded. This is provided to give you per-section feedback on your
strengths. The maximum possible # of points is 155; the minimum to
pass is 124. General Considerations(maximum = 72): 71 Documentation
(maximum = 10): 9 Object-Oriented Design(maximum = 6): 6 GUI(maximum
= 20): 20 Data conversion program(maximum = 10): 7 Server(maximum =
37): 34
I will be happy to answer any questions that anyone may have.
Thanks,
Rohini Sulatycki
Originally posted by Milind Kulkarni:
Hi All,
I am in the process of designing a system for an insurance company. This insurance comapany has number of products for their different types of customers.
We need to design our application in such a way that the system should be flexible enough so that the new products could be added without having to make lot of changes in the existing system.
We plan to have a css (cascading style sheets) for the front end for each of these products and some generic methods which would the processing at the back.
Is there a better way of doing this using XML technology? Please let me know.
Regards,
Milind
Originally posted by Jayakumar Duraisamy:
Hi,
The exam is to make sure that whether you are the person who has done the assignment. U Really don't need to bother about the question. U are given two hrs to complete the written exam. Which is too much for five questions. Believe me, u really don't need to worry about the exam...
Best of luck
Regards
Jayakumar
Originally posted by Jayakumar Duraisamy:
Hi Guys,
I am pleased to post that i have passed the exam with a score of 146/155 [94.2%]. I have been a silent member in this forum except a few times.
THANKS FOR ALL THE HELP AND IDEAS I HAVE GOT FROM THIS FORUM.
Here is my examiner's report...
Grade: P
Score: 146
Comment: This report shows the total points that could have been awarded in each section and the actual number of points you were awarded. This is provided to give you per-section feedback on your strengths. The maximum possible # of points is 155; the minimum to pass is 124. General Considerations(maximum = 58): 53 Documentation(maximum = 20): 19 GUI(maximum = 24): 23 Server(maximum = 53): 51
IF U GUYS HAVE ANY QUESTIONS I WILL BE GLAD TO ANSWER...
Once again, Thanks to all and Java Ranch Forum
With Warm Regards
Jayakumar
Originally posted by Ajith Kallambella:
The System class maintains a set of properties, key/value pairs, that define traits or attributes of the current working environment. When the runtime system first starts up, the system properties are initialized to contain information about the runtime environment. including information about the current user, the current version of the Java runtime, and even the character used to separate components of a filename.
Checkout Java Tutorial section on System properties for an excellent introduction to how and when the properites can be used.
JAXP uses "org.xml.sax.parser" as key for SAX Parser class name.
You can use the System properties to tell JAXP to use a specific SAX/DOM parser. You can either tweak the properties file externally or inside your program. Here's an example -
[b]System.setProperty ("org.xml.sax.parser","<QualifiedpathToYourParser>");
Hope that helps!
[/B]
Originally posted by Ajith Kallambella:
The System class maintains a set of properties, key/value pairs, that define traits or attributes of the current working environment. When the runtime system first starts up, the system properties are initialized to contain information about the runtime environment. including information about the current user, the current version of the Java runtime, and even the character used to separate components of a filename.
Checkout Java Tutorial section on System properties for an excellent introduction to how and when the properites can be used.
JAXP uses "org.xml.sax.parser" as key for SAX Parser class name.
You can use the System properties to tell JAXP to use a specific SAX/DOM parser. You can either tweak the properties file externally or inside your program. Here's an example -
[b]System.setProperty ("org.xml.sax.parser","<QualifiedpathToYourParser>");
Hope that helps!
[/B]
Originally posted by Brooklyn Luo:
I have 2 questions regarding DOM/SAX test from Java Ranch's XML Exam List.
4.There is XML data document which is very large. The application is to extract the very few of its information from document. The memory & speed may be a constraint. Which is the most likely method to be implemented?
a) Extract the information using SAX API, event based methods.
b) To extract the information using DOM API.
c) To extract the necessary information and process using XSLT.
d) To use schema based approach.
Answer:b
Can someone tell me why a is not correct?
11. Use of SAX based parser is most likely to be used in which of the following scenarios?
a) You want to process the document in a sequential order only.
b) The documents is very large.
c) When there is no need to validate XML documents.
d) The parser implements only SAX based approach.
Answer:a
I think b is also OK.
Thanks