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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:13:46+00:00 2026-05-26T14:13:46+00:00

I am using lxml to parse xml I got from amazon product advertisement API.

  • 0

I am using lxml to parse xml I got from amazon product advertisement API.
The tree is parsed as:

root=etree.XML(self.sendRequest(parameters))

When I use root.tag or root.child.tag, I always get something like:

{http://webservices.amazon.com/AWSECommerceService/2005-10-05}RequestProcessingTime

The link appears in the tag name is actually an attribute of root element:

<ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2005-10-05">

However, it doesn’t seem to be correctly parsed.
Is there a way I can remove the annoying {…} from the tags?

  • 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-26T14:13:46+00:00Added an answer on May 26, 2026 at 2:13 pm

    The part between the braces is the XML namespace, which is read from the xmlns attribute of the element. You can’t get rid of it, because this is just how the element tree API which lxml is based on is defined: All tag names are prefixed with their namespace in curly braces.

    Some notion of namespacing is mandatory for a well-behaved XML parser to resolve ambiguities, which arise because the same tag name can appear in different namespaces with different meanings, and a single document can contain tags from multiple namespaces.

    Your document is parsed correctly, you simply have to consider the namespace in your program. That’s it.

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

Sidebar

Related Questions

I parse in the XML using from lxml import etree tree = etree.parse('test.xml', etree.XMLParser())
I'm trying to parse an xml file using lxml. xml.etree allowed me to simply
I'm using lxml as follows to parse an exported XML file from another system:
I have an xml file that I'm using etree from lxml to work with,
I am attempting to manipulate a DOM tree using lxml 's etree module. One
I am trying to migrate some code from using ElementTree to using lxml.etree and
Please help me parse a configuration file of the below prototype using lxml etree.
I want to parse HTML with lxml using XPath expressions. My problem is matching
i am using XML as my backend for the application... LXML is used to
I am using python lxml library to parse html pages: import lxml.html # this

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.