Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you parse data in xml? Which kind of class do you use with java to pass data?



How do you parse data in xml? Which kind of class do you use with java to pass data?..

Answer / Kumar Alok Rajan

XML data can be parsed using the DocumentBuilderFactory and DocumentBuilder classes in Java. A Sample code would look like: SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser = factory.newSAXParser(); XMLReader xmlReader = saxParser.getXMLReader(); XmlHandler handler = new XmlHandler(); xmlReader.setContentHandler(handler); xmlReader.parse(new FileReader("file.xml")); For passing data, the org.w3c.dom package can be used.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apache Spark Interview Questions

What is apache spark good for?

1 Answers  


What is lambda architecture spark?

1 Answers  


explain the use of blinkdb?

1 Answers  


What is in memory in spark?

1 Answers  


Can we do real-time processing using spark sql?

1 Answers  


What are benefits of Spark over MapReduce?

1 Answers  


What is client mode in spark?

1 Answers  


What is a partition in spark?

1 Answers  


What is tungsten engine in spark?

1 Answers  


Can you run spark without hadoop?

1 Answers  


What is a "Spark Executor"?

1 Answers  


How can we create RDD in Apache Spark?

1 Answers  


Categories