×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Kxml parsing to retrieve attributes

    Hi,
    I am trying to retrieve the whole xml file and traverse it till the end. But the problem i am getting is in retrieving the attribute value of the elements with the same name. For example, consider the file below:

    <?xml version="1.0"?>
    <NEWS>
    <NEWSDETAILS category="Events">
    <title>Fancy Dress</title>
    <details>Fancy Dress Competition on Saturday</details>
    </NEWSDETAILS>
    <NEWSDETAILS category="Awards">
    <title>Grammy Awards</title>
    <details>School gets an award!</details>
    </NEWSDETAILS>
    </NEWS>


    Now from this, I need to retrieve the Events and Awards keywords. Can u please help me with this.
    It will be highly appreciated.

    Thanks

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Kxml parsing to retrieve attributes

    Which parser are you trying to use KXML or JSR 172 for this ?

    thanks,
    ~Amitabh

  3. #3
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Re: Kxml parsing to retrieve attributes

    Quote Originally Posted by im2amit View Post
    Which parser are you trying to use KXML or JSR 172 for this ?

    thanks,
    ~Amitabh
    Hi ,Thanks for your response
    I am using kxml parser

  4. #4
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Re: Kxml parsing to retrieve attributes

    Please,If anyone can help me out with any links or examples than please help me.

  5. #5
    Registered User
    Join Date
    Nov 2009
    Posts
    188

    Re: Kxml parsing to retrieve attributes

    Quote Originally Posted by yatibawri View Post
    Please,If anyone can help me out with any links or examples than please help me.
    Refer the below links.It may help you!

    http://developers.sun.com/mobility/m...es/parsingxml/
    http://www.ibm.com/developerworks/library/wi-parsexml/
    http://www.java-tips.org/java-me-tip...e-devices.html
    http://kxml.objectweb.org/software/d...XmlParser.html

    Regards,
    Ajit

  6. #6
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    127

    Re: Kxml parsing to retrieve attributes

    Hi Ajit,
    Thanks for your response,I have already gone through these examples,but it was on no help.
    I want an example of using attributes.
    If anyone can help me with it.

  7. #7

Similar Threads

  1. Replies: 27
    Last Post: 2011-04-20, 21:21
  2. Parsing wbxml file to xml file using kxml parser
    By ramyashashe in forum Mobile Java General
    Replies: 18
    Last Post: 2010-05-17, 15:56
  3. KXML parsing problem on different devices
    By bumble-bee in forum Mobile Java General
    Replies: 2
    Last Post: 2009-11-20, 10:07
  4. Replies: 0
    Last Post: 2009-06-09, 14:49
  5. Http error | Kxml parsing
    By javame in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2003-09-12, 09:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •