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 7548921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:49:11+00:00 2026-05-30T09:49:11+00:00

I am testing how to use SAXParser and understanding its component . Here is

  • 0

I am testing how to use SAXParser and understanding its component . Here is my XML file that I used to test:

<?xml-stylesheet href="/externalflash/NASA_Detail/NASA_Detail.xsl" type="text/xsl"?>

<rss version="2.0">
    <channel>
        <title>NASA Image of the Day</title>
        <link>http://www.nasa.gov/multimedia/imagegallery/index.html</link>
        <description>The latest NASA "Image of the Day" image.</description>
        <language>en-us</language>
        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
        <managingEditor>yvette.smith-1@nasa.gov</managingEditor>
        <webMaster>brian.dunbar@nasa.gov</webMaster>

        <item xmlns:java_code="xalan://gov.nasa.build.Utils1"> 
            <title>Expedition 30 Cosmonauts Perform Spacewalk</title> 
            <link>http://www.nasa.gov/multimedia/imagegallery/image_feature_2181.html</link>
            <description>This image of Russian cosmonauts Oleg Kononenko and Anton Shkaplerov, both Expedition 30 flight engineers, was taken during a spacewalk on Thursday, Feb. 16, 2012. During the six-hour, 15-minute spacewalk, Kononenko and Shkaplerov moved the Strela-1 crane from the Pirs Docking Compartment in preparation for replacing it in 2012 with a new laboratory and docking module. The duo used another boom, the Strela-2, to move the hand-operated crane to the Poisk module for future assembly and maintenance work. Both telescoping booms extend like fishing rods and are used to move massive components outside the station. On the exterior of the Poisk Mini-Research Module 2, they also installed the Vinoslivost Materials Sample Experiment, which will investigate the influence of space on the mechanical properties of the materials. The spacewalkers also collected a test sample from underneath the insulation on the Zvezda Service Module to search for any signs of living organisms. Both spacewalkers wore Russian Orlan spacesuits bearing blue stripes and equipped with NASA helmet cameras. Image Credit: NASA</description>
            <guid isPermaLink="true">http://www.nasa.gov/multimedia/imagegallery/image_feature_2181.html</guid>
            <pubDate>Wed, 22 Feb 2012 00:00:00 EST</pubDate>
            <enclosure length="1234567" type="image/jpeg" url="http://www.nasa.gov/images/content/624856main_image_2181_516-387.jpg"/>
        </item>
    </channel>
</rss>

When I use SAXParser to test this file, here is some line of my output:

start Element: rss
Local Name  // this line I don't know why null
qNam: rss
start characters: 

start Element: channel
Local Name 
qNam: channel
start characters: 

My question is: in my XML file, no namespace so each element will belong to its default namespace and that why qName will equals to local Name (Because no prefix for qName).

But at above result, at element rss and channel (and all others that I haven’t posted,yet), local Name is null !!!

Who can explain for me,please.

thanks 🙂

  • 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-30T09:49:12+00:00Added an answer on May 30, 2026 at 9:49 am

    This is slightly unclear in the Javadoc:

    uri – the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed

    localName – the local name (without prefix), or the empty string if Namespace processing is not being performed

    qName – the qualified name (with prefix), or the empty string if qualified names are not available

    atts – the attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. The value of this object after startElement returns is undefined

    With namespace processing turned off, only the qName is being returned (with no prefix).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a unit testing framework to use with javascript that integrates
How to use SAXParser for parsing a XML in which major things are in
I've been testing use of XML::Simple with perl. I am able to print out
So I have a bunch of files that I use for testing in a
I have this sprite rotating algorithm (its poorly named and just used for testing).
I've been doing some performance testing around the use of System.Diagnostics.Debug, and it seems
I need recommendations on a good Unit Testing book for use with ASP.NET MVC.
I use Virtual PC to create fresh environments for testing my installer. But I
We currently use LoadRunner for performance testing our web apps, but we also have
I'm trying to use check unit testing framework for my C application. But I

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.