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
  • 0 Views
  • 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

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
I still very new using Subversion. Is it possible to have a working copy
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
I'm very new to programming & came across a program in a book i'm
im very new in cocoa development and I'm trying to load a Window. I
Am very new to Android programming, so sorry if this is a simple problem.
I'm very very new on ActionScript 3.0 development for Blackberry Playbook. I'm working with
I'm developing an ActionScript 3 for Blackberry Playbook. I'm very very new on ActionScript

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.