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

The Archive Base Latest Questions

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

How do I display on an html page an xml? how can I set

  • 0

How do I display on an html page an xml?

how can I set in python text/html?

I’m writing in the html as:

response.out.write
  • 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-26T06:13:13+00:00Added an answer on May 26, 2026 at 6:13 am

    Assuming your using mod_python:

    response.content_type = "text/xml"
    

    Or:

    response.content_type = "text/html"
    

    http://www.modpython.org/live/current/doc-html/pyapi-mprequest-mem.html

    content_type

    String. The content type. Mod_python maintains an
    internal flag (req._content_type_set) to keep track of whether
    content_type was set manually from within Python. The publisher
    handler uses this flag in the following way: when content_type isn’t
    explicitly set, it attempts to guess the content type by examining the
    first few bytes of the output.


    If you just want to have pretty xml output in a text file, use BeautifulSoup prettify() on the xml.

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

Sidebar

Related Questions

How to display a XML document in a HTML page as a collapsible and
I'm trying to get an html page to display an XML file formatted with
How can I display HTML text in textview? For example, string <h1>Krupal testing <span
I'm trying to display the page title (html title) on the default.aspx page of
I want to display the ImageLink on my ASP.NET MVC Page. HTML. ImageLink is
i have a page that displays large datasets into html tables. how can i
Basically I want to post XML (with Content-Type text/xml) to an URL and display
I'm using the following in the web page but can't get a response from
can i parse remote(not local) file using JS/Jquery? i want to display remote xml
I want to display the content of an html page and an image to

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.