• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML parsing

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using SAX parser to read XML document.My objective is to store the contents to the HashTable as values and attribute value as key.

How do i do this using SAX parser?

Below is the XML file:

<?xml version="1.0" encoding="UTF-8"?>
<LocalCrawler>
<directoryPaths directoryPaths="D:\loasas\temp1">
<fileID fileID="0">
<location>specialchar.doc</location>
<title>abc</title>
<author>xyz</author>
<applicationName>Microsoft Word 9.0</applicationName>
<keywords></keywords>
<createdDate>Wed Dec 08 16:12:00 GMT+05:30 2004</createdDate>
<lastModifiedBy>xyz</lastModifiedBy>
<lastModifiedDate>Thu Dec 09 10:12:00 GMT+05:30 2004</lastModifiedDate>
<modifiedDate>Mon Jan 01 05:33:00 GMT+05:30 1601</modifiedDate>
<subject></subject>
<comments></comments>
<data>hdfdfhdjfdj</data>
</fileID>
</directoryPaths>
</LocalCrawler>

Thanks in advance
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IBM developer works has a tutorial on understanding SAX and DOM.
check out this links

http://www-106.ibm.com/developerworks/edu/x-dw-xusax-i.html?S_TACT=104AHW06&S_CMP=EDU

http://www-106.ibm.com/developerworks/views/xml/tutorials.jsp
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic