Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What are the steps necessary to parse XML documents?

user-image
Question added by Mohammed Shaban , Senior software engineering , Thiqah
Date Posted: 2016/02/14
Lashima Nasreen
by Lashima Nasreen , Scrum Master , Dubai Health Authority

  • Create a instance of DocumentBuilderFactory Object (newInstance() method).
  • Reference to DocumentBuilder object using newDocumentBuilder() method of DocumentBuilderFactory.
  • Reference to Document object of the xml file to be parsed by using DocumentBuilder.parse(File xmlfile) with File object as argument
  • start using Document object to get the elements of the xml file using getElementsByTagName(),getElementsByName() 

Step 1 - Install a library that parses XML documents appropriate for the language you are using.

Step 2 - Use the library's API, as specified by its documentation, to parse XML

Step 3 - ...?

Step 4 - Profit

More Questions Like This