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 |
What is apache spark good for?
What is lambda architecture spark?
explain the use of blinkdb?
What is in memory in spark?
Can we do real-time processing using spark sql?
What are benefits of Spark over MapReduce?
What is client mode in spark?
What is a partition in spark?
What is tungsten engine in spark?
Can you run spark without hadoop?
What is a "Spark Executor"?
How can we create RDD in Apache Spark?
Apache Hadoop (394)
MapReduce (354)
Apache Hive (345)
Apache Pig (225)
Apache Spark (991)
Apache HBase (164)
Apache Flume (95)
Apache Impala (72)
Apache Cassandra (392)
Apache Mahout (35)
Apache Sqoop (82)
Apache ZooKeeper (65)
Apache Ambari (93)
Apache HCatalog (34)
Apache HDFS Hadoop Distributed File System (214)
Apache Kafka (189)
Apache Avro (26)
Apache Presto (15)
Apache Tajo (26)
Hadoop General (407)