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

  • Home
  • SEARCH
  • 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 7549397
In Process

The Archive Base Latest Questions

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

In Java, Handler class contains method which name is startElement .this method has prototype:

  • 0

In Java, Handler class contains method which name is startElement.this method has prototype:

public void startElement(String uri, String localName, String qName, Attributes attributes)

I have read on Oracle Java website, but I still not understand what different between localName and qName parameter.Here they explain:

localName – The local name (without prefix), or the empty string if
Namespace processing is not being performed.
qName – The qualified XML 1.0 name (with prefix), or the empty string if qualified names are not available.

In above definition, I don’t know some concepts: prefix (prefix of what ?) Namespace

Who can explain for me (as most simple as you can) about these parameter, 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:56:23+00:00Added an answer on May 30, 2026 at 9:56 am

    As an example, I’m going to refer to the following XML sample:

    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="note">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="to" type="xs:string"/>
            <xs:element name="from" type="xs:string"/>
            <xs:element name="heading" type="xs:string"/>
            <xs:element name="body" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    

    Namespace

    A namespace is the logical container in which an element is defined. The XML Schema namespace (with uri: http://www.w3.org/2001/XMLSchema). In the above document, it is being referenced on line 2. XML document processing may occur using an XML parser which is either namespace-aware or not, but documents using namespaces will typically need to be parsed by namespace-aware parsers.

    Namespaces are defined so that a) they can be cataloged by the parser and b) so that elements with the same name in different namespaces can exist in the same document without becoming ambiguously-defined.

    Prefix

    A prefix is the short-hand key used to refer to a namespace. In the above example, xs is used to refer to the XML Schema namespace.

    Local Name (Part)

    An element in a document has a name as it is defined in the namespace. In the above example, you can find schema, element, complexType, sequence, and element as local names. Local names can be ambiguous if you have multiple namespaces referenced in your document and one or more of those namespaces define elements with the same name.

    Qualified Name (qName)

    A qualified name consists of the prefix for the namespace (optionally, some implementations can use the namespace uri), followed by a :, followed by the element’s local name. In the above example, you can find xs:schema, xs:element, xs:complexType, xs:sequence, and xs:element as qualified names. These names are unambiguous, and can be processed by the parser and validated.

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

Sidebar

Related Questions

//calling class import javax.swing.JFrame; class jcheckkbox { public static void main(String args[]) { jRadio
My LocalService.java contains a class LocalBinder that defines the methods that are declared in
I am making an jaxbcontext newInstance, passing DO as a class.My DO contains java.sql.clob
I am calling the below command using java This is the java initialization String
Here's a scenario: I have a java front end (RCP/SWT) app which currently has
I'm developing a utility class to handle Actions from Java Swing components; I would
What is the event handler in Java (using net beans, Swing) that resembles the
What is the event handler in Java (using net beans) that resembles the From_Load
I have implemented a SAX parser in Java by extending the default handler. The
In languages like Java, you can declare a class without a modifier so it

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.