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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:35:01+00:00 2026-05-22T22:35:01+00:00

I am writing code to work with Amazon query based APIs, which return XML

  • 0

I am writing code to work with Amazon query based APIs, which return XML which I then wish to parse with lxml. I have written several functions which work perfectly to load the XML and parse it.

Each function loads the XML using:

variable = lxml.etree.parse("http://...")

This works perfectly, the FIRST time it is run. However, if I wish to load a second URL (be it the same one, or a different one) during the course of a running python session, I get the error:

lxml.etree.XMLSyntaxError: Attempt to load network entity http://...

(Of course, the ellipses are replaced in both cases with the rest of the URL.)

Therefore, for some reason, I appear to be unable to load two XML documents using the parse method in a running python session.

Does anyone know what I may be doing wrong here, or have a solution?

  • 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-22T22:35:01+00:00Added an answer on May 22, 2026 at 10:35 pm

    Known unfixed bug.

    Use urllib2.urlopen() to get a file-like object and pass that to lxml.etree.parse()

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

Sidebar

Related Questions

I'm interested in experimenting with writing R code on my laptop which I then
Well, now i have a new problem. Im writing code in C# I want
I have a piece of C++ code which reads out the text of a
I have written some VSTO (2003) code that sucessfully applies some mandatory subject line
I have started making a syntax highlighter in php (only a quick one) and
So I'm writing a roguelike and I need to generate some dungeons randomly. I
For example: http://www.youtube.com/watch?v=tKTZoB2Vjuk (@ 5 min) I have no idea how one would go
i have problem with using bitmap in console application in c#. I included system.drawing
I'm struggling a bit with traversing in jQuery. Here's the relevant markup: <ul id=sortable
Consider a primitive type variable with lots of threads reading and a few threads

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.