Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6906687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:20:30+00:00 2026-05-27T08:20:30+00:00

i am very new in blackberry, now i am trying to do XML programming,

  • 0

i am very new in blackberry, now i am trying to do XML programming, using defaulthandler in sax parser blackberry.

any sample code, url or any advice highly appreciated.

thanks

Regards..

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:20:31+00:00Added an answer on May 27, 2026 at 8:20 am

    Find the sample code here. Cheers. 😉

    // IBMRssXMLHandler.java
    //
    // MSI Services, Inc.
    // Frank Ableson
    // 973.448.0070
    // fableson@msiservices.com
    // code free to use for any purpose, commercial or otherwise
    
    package com.msi.ibm.rssreader;
    
    import org.xml.sax.helpers.*;
    import org.xml.sax.*;
    import java.lang.StringBuffer;
    
    import com.msi.ibm.rssreader.IBMRssStorage.*;
    
    /**
     * 
     */
    class IBMRssXMLHandler extends DefaultHandler {
        StringBuffer sb = null;
        IBMRssFeed _feed = null;
        IBMRssItem item = null;
        boolean bStarted = false;
    
        IBMRssStorage rssStore = null;
    
        IBMRssXMLHandler(IBMRssFeed feed) {
            _feed = feed;
            rssStore = new IBMRssStorage();
        }
    
        public void warning(SAXParseException e) {
            System.err.println("warning: " + e.getMessage());
            bStarted = false;
        }
    
        public void error(SAXParseException e) {
            System.err.println("error: " + e.getMessage());
        }
    
        public void fatalError(SAXParseException e) {
            System.err.println("fatalError: " + e.getMessage());
            bStarted = false;
        }
    
        public void startDocument() throws SAXException {
            System.out.println("startDocument");
        }
    
        public void endDocument() throws SAXException {
            System.out.println("endDocument");
            // we've concluded this document, safe to create the feed.
            rssStore.closeStore();
        }
    
        public void startElement(String namespaceURI, String localName,
                String qName, Attributes atts) throws SAXException {
            System.out.println("startElement [" + localName + "]");// Attributes
                                                                    // [" + atts.toString() + "]");
            sb = new StringBuffer("");
            if (localName.equals("item")) {
                bStarted = true;
                // new item, let's set up!
                item = rssStore.createItem();
            }
        }
    
        public void endElement(String namespaceURI, String localName, String qName)
                throws SAXException {
            System.out.println("endElement [" + localName + "] value = ["
                    + sb.toString() + "]");
    
            if (bStarted == false)
                return;
    
            if (localName.equals("item")) {
                // store this item!
                item.setName(_feed.getName());
                System.out.println("Storing item! [" + item.toString());
    
                rssStore.addRecord(item);
    
            }
            if (localName.equals("title")) {
                item.setTitle(sb.toString());
            }
    
            if (localName.equals("link")) {
                item.setLink(sb.toString());
            }
    
            if (localName.equals("description")) {
                item.setDescription(sb.toString());
            }
    
            if (localName.equals("category")) {
                item.setCategory(sb.toString());
            }
    
            if (localName.equals("pubDate")) {
                item.setPubDate(sb.toString());
            }
    
            sb = new StringBuffer("");
    
        }
    
        public void characters(char ch[], int start, int length) {
            String theString = new String(ch, start, length);
            System.out.println("characters [" + theString + "]");
            sb.append(theString);
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are trying to consume webservices in blackberry.We are very new in developing apps
Very new to JQuery and MVC and webdevelopment over all. I'm now trying to
Very new to PHP/programming in general, and I've been trying to run a PHP
Very new to XSL (and XML for that matter), but I need to step
Very new to using Raphael.js I'm looking at the tutorials and I am able
Very new mobile developer here... I am trying to retrieve a list of tweets
Im very new in C++ I have found this post http://msdn.microsoft.com/en-us/magazine/cc163486.aspx and trying to
I'm very new to Java which is required for a Blackberry App development project
I am very much new to the blackberry UI development and want to know
im very new to jquery/javascript. So here goes, I found this js code for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.