Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
project that requires me to use XML and retrieve the stored data using DOM parser. I have it written to the point that it writes regular equations no problem. But I want to include graph using images in the form of JPEG. Is there any way I can store the name of the image in xml and call it using DOM parser? Or do I need to specifiy the path using getAbsolute path? My Dom parser has the format of:
public class RetrieveXML {
/*** Default constructor*/ private String dpath;public RetrieveXML(String path) {dpath = path;}/*** Function to return question IDs for later output processing.* @param section* @return List of integer values of questions that are of the given difficulty*/public List returnByGraph(String graph){List questionsToReturn = new List();try {DocumentBuilderFactory dBF = DocumentBuilderFactory.newInstance();DocumentBuilder docBuilder = dBF.newDocumentBuilder();Document database = docBuilder.parse(new File(dpath));NodeList listOfQuestions = database.getElementsByTagName("question");for(int i=0; i<listOfQuestions.getLength(); i++) {Node firstQuestion = listOfQuestions.item(i);Element firstQuestionE = (Element)firstQuestion;NodeList sectionlist = firstQuestionE.getElementsByTagName("graph");Element firstSectionElement = (Element)sectionlist.item(0);NodeList textSectionList = firstSectionElement.getChildNodes();double sectionvalue = Double.valueOf(textSectionList.item(0).getNodeValue().trim());if (sectionvalue == section) {NodeList idlist = firstQuestionE.getElementsByTagName("id");Element firstIDElement = (Element)idlist.item(0);NodeList textIDList = firstIDElement.getChildNodes();String questionID = textIDList.item(0).getNodeValue().trim();questionsToReturn.add(questionID);}}}catch(ParserConfigurationException pce) {pce.printStackTrace();}catch(SAXException se) {se.printStackTrace();}catch(IOException ioe) {ioe.printStackTrace();}return questionsToReturn;}XML file:
<TestBank><question><id>0002</id><subject>Calculus I</subject><section>2.2</section> <topic>limit</topic><difficulty>3</difficulty> <latex_instructions>Determine the infinite limit:</latex_instructions><latex_q>\lim_{x \to 2\pi^-} x csc x</latex_q><graph> image.jpeg </graph><jeopardy_q> </jeopardy_q><jeopardy_a> </jeopardy_a><instructions> </instructions></question><TestBank>
Multiple KDC Domains to chain of three KDC. In other words, suppose that Alice wants to talk to Boris through a chain of 3 KDCs. Provide sequence of events necessary to establish communication.
How many different seven-digit phone numbers (ignoring area code) can be formed? Can city of 2 million people be served by single area code? Describe.
In this problem you are enquired to hand-turn RSA protocol to encrypt and decrypt messages by using rather smaller numbers than are used in practice, so that calculations can be done by hand.
How to reverse a 16-bit binary number by LC-3 program? Program should assume that the word to be reversed is stored in memory location x3100.
Design a two level AND , OR ,NOT circuit for the following I/O priority circuit,when the ack input is true ack will be made true for the smallest j for which req is true.
The sport of gymnastics requires both impressive physical strength and extensive training for balance. The iron cross is an exercise performed on two suspended rings
In the recent court case, a judge cited the city for contempt and ordered fine of $2 for first day. Each subsequent day, till the city followed judge's order, fine was squared.
Explain one technological device in 350 to 700 words. Include the following:When did it come (or will it potentially come) into existence? What scientific or technological reasoning explains how this potential will be (or can be) be reached in t..
Based on the following sequence of word addresses generated by the processor:1, 134, 212, 1, 135, 213, 162, 161, 2, 44, 41, 221a) Given a direct-mapped cache with 8 two-word blocks that is initially empty
Do you think a computer will ever be developed which can think like human? Write down the ethical implications of creating such a computer?
For the following pair of regular languages, find a regular expression and an Finite Automata that each define L1 ? L2
Write a console program that will ask the user for an item number in the inventory and display the name of that item. Stay in a loop so that the user may enter the item number multiple times. Use the letter E to exit the application. Show an error me..
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd