• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Getting started with XML

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been reading Mastering XML (Navarro, White, Burman), and I have read some online tutorials about XML, but I still haven't seen any examples of how to, given the URL of an XML file, manipulate the XML info. If someone could suggest an online tutorial that shows what Java classes need to be used, etc. starting with the basics of Java/XML integration, I would appreciate it.
Thanks,
Richard
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If someone could suggest an online tutorial that shows what Java classes need to be used...
Choosing what Java classes to use can be complicated, because there are so many to choose from. The primary difference is what kind of processing model (parsing) they use: DOM or SAX. Roughly speaking, DOM reads the whole XML file in memory and then allows fast access to any node. SAX doesn't keep the whole XML file in memory instead reporting events when reading: �tag started...�, �tag ended...� � so we can save memory but at the price of sequential access only. For more details:
Java Examples in a Nutshell, 2nd Edition
Chapter 19 XML: http://www.oreilly.com/catalog/jenut2/chapter/ch19.html
Mapping XML to Java http://www.javaworld.com/javaworld/jw-08-2000/jw-0804-sax.html
Programming XML in Java http://www.javaworld.com/javaworld/jw-03-2000/jw-03-xmlsax.html
There are also APIs built on the top of underlying parsing models, most notable JAXP, supported by SUN and JDOM (which was designed to easy access to DOM or SAX methods):
Working with XML. The Java API for Xml Parsing (JAXP) Tutorial http://java.sun.com/xml/jaxp-1.0.1/docs/tutorial/index.html
Easy Java/XML integration with JDOM http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom.html
 
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!