• 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

How to get Node value in SAX

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends,
I need a small help.
I need to parse a xml file
<?xml version="1.0" encoding="UTF-8"?>
<Report>
<DatasetName>CustomizedData</DatasetName>
<Level>
<Columns>
<col>ORG_ADDRESS</col>
<col>COUNT(*)</col>
</Columns>
<Rows>*</Rows>
<Order>DESC</Order>
<Group>SEARCH_CODE</Group>
<Condition>
<Con>COUNT(*)>2</Con>
<Con>CUSTOMER</Con>
</Condition>
</Level>
</Report>

Already I have parsed it.
I want the node values.
I have tried using characters(char[] ch, int start, int length)
but it is printing unnecessary lines. U may come to know by seeing the output.I have tried to use trim() method but no success.
Thanxs in advance.

I am giving the output here:



-----Start Parsing------
1)
2
3CustomizedData
4
5
6
7
8
9
10ORG_ADDRESS
11
12
13COUNT(*)
14
15
16
17
18*
19
20
21DESC
22
23
24SEARCH_CODE
25
26
27
28
29COUNT(*)>2
30
31
32CUSTOMER
33
34
35
36
37
--------End Parsing-----------

Thanx in advance
bye
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you post some code? (specifically your handler's characters(), startElement() and endElement() methods)
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic