Blog Archives

Types of XML Parsers


Advertisements

Tagged with: ,
Posted in XML

Introduction to XML


Tagged with: ,
Posted in XML

How to create XML file in Java


package com.test; import java.io.File; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; public class CreateXMLInJava { public static void main(String argv[]) { CreateXMLInJava createXml = new

Tagged with: , , , , ,
Posted in JAVA, XML

SAX Parser Example in JAVA


package com.test; import java.io.StringReader; import java.util.Enumeration; import java.util.Locale; import java.util.ResourceBundle; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; public class ParseXMLUsingSAX { public static String xmlString = “<?xml version=’1.0′?><EMPLOYEE><USER_ID>admin</USER_ID><PASSWORD>admin123</PASSWORD></EMPLOYEE>”; public static void main(String argv[]) { String

Tagged with: , , ,
Posted in JAVA

XML Parsing Example using DOM in Java


package com.test; import java.io.StringReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.CharacterData; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; public class XMLParsing {   public static void main(String arg[]) throws Exception{ String xmlRecords = “<data><employee><name>A</name>” + “<title>Manager</title></employee></data>”;    

Tagged with: ,
Posted in JAVA

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 678 other followers

Calendar
July 2018
M T W T F S S
« Mar    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 266,261 hits
IndiBlogger
malliktalksjava.wordpress.c...
70/100