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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:35:32+00:00 2026-06-04T02:35:32+00:00

I have a XML for which i am writing a servlet to pick up

  • 0

I have a XML for which i am writing a servlet to pick up contents from the XML. One such tag is <itunes:author>Jonathan Kendrick</itunes:author>
I need to get author value for this. because of :

I tried using namespace and using escape sequence for : but it did not worked for me.

For rest of other XML elements i am simply using

String link=node.getChildText("link").toString();

I am using Jdom parser

  • 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-06-04T02:35:34+00:00Added an answer on June 4, 2026 at 2:35 am

    in your XML the sequernce ‘itunes:author’ represents what’s called a Q-Namem a “Qualified Name”. In XML it consists of a ‘Namespace prefix’, and a ‘Local Name’. In your example, the namespace prefix is ‘itunes’, and the ‘local name’ is ‘author’.

    What you want is the ‘author’ element in the namespace linked to the prefix ‘itunes’. The actual namespace is normally a full URL. I believe the full URL for your example is probably xmlns:itunes=”http://www.itunes.com/dtds/podcast-1.0.dtd”, but you should check that.

    So, the Namespace is “http://www.itunes.com/dtds/podcast-1.0.dtd”, it’s prefix is declared to be ‘itunes’ (but it could be something else – the actual prefix name is not technically important…)

    You want to get the ‘author’ in the ‘http://www.itunes.com/dtds/podcast-1.0.dtd’ Namespace so you want:

    String author = node.getChildText("author", Namespace.getNamespace("http://www.itunes.com/dtds/podcast-1.0.dtd"));
    

    For more information on Namespaces check out: http://www.w3schools.com/xml/xml_namespaces.asp

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

Sidebar

Related Questions

I'm writing one stored procedure, which I have to create a xml column from
I have a 12 XML files from which I am extracting ONE CSV file,
I have a XML layout which has two edit text fields, one for title
I have 9 xml files which is our project database, we are writing in
I have tried with XML Lite which is pretty good with reading and writing
We have a Perl program to validate XML which is invoked from a Java
I have a table with a few relational columns and one XML column which
I'm trying to add some contacts from an xml file which have been serialize
I have some XML which I would like to serialize into a class. <Group>
I have some XML which contains records and sub records, like this: <data> <record

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.