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>
Assume the weekly hours for all employees are stored in the two-dimensional array. Each row records the employee's seven-day work hours with seven columns. Determine total hours committed by each employee every week.
Investigate Project Management Body of Knowledge (PMBoK). Write a report on one of knowledge areas. Describe the task of understanding potential threats
Use Microsoft Word, Excel or PowerPoint to develop timeline on computer. Create your own timeline and take a picture, saving file on computer as .jpg or .gif.
Consider a simple paging system with the following parameters: 2^32 bytes of physical memory, page size of 2^10 bytes, and 2^16 pages of logical address space. How many bits are in a logical address?
write a program to compute each semester the tuition for each student. Studient is taking 12 credit or less, tuition is 675 oer credit if student is taking more than 12 credits the total tuition is 6300.
Many experts assert which industrialization has essentially made us less independent and more closely related to other people than ever before.
Write a function DrawLineGraph that generates a line graph given an array of x-coordinate values, a second array of corresponding y-coordinate values, and the number of data points.
Design a structure stack that represents a stack of elements of some arbitrary type. Include the functions: create(returns an empty stack), push(add an element to the top of the stack and return the resulting stack)
If /home/jenny/draft and /home/alex/letter are links to same file and following sequence of events occurs, what will be date in opening of letter? Alex gives command vim letter.
Few organizations tend to prefer operating expense models. whether Cloud providers will continue to secure large amount of capital....or will equity firms stop their funding?
Currently our organisation has a sample running application to sell books which has been designed as an early proof of concept. The application can be found in your installation at C:glassfish3glassfishdocsjavaee-tutorialexamplescase-studiesdukes-boo..
Given a "Complex" class with all the standard methods for complex numbers, design the static method below to find and return the smallest complex number.
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