• 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 ...
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown

Acessing value of attribute

Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<xs:element name="PARTED" default="Y" minOccurs="0" maxOccurs="1">

I Have tag like this in my XML file .

i expect the default value y if in my xml file i use it like <PARTED/>. but how can i retrieve the value of attribute default.

I tried to acess it from my startelement method as i parses using sax parser. I tried to get value using attribute object .getVlaue(name of the attribute)

But it returned null value. Where am i going wrong?

"public void startElement(String uri, String localName, String qname,Attributes attributes) "

If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic