MK.
MK.

Reputation: 4027

returning xml documents from cherrypy

I am new to web programming and am trying to return an xml document from the cherrypy web server. But, what I see in the browser is a string value stripped off all the xml tags. i.e.

<Foo>
   <Val1>
</Foo>
<Bar>
   <Val2>
</Bar>

shows up in the browser as Val1 Val2

I am sure that I am generating the document correctly but somewhere after cherrypy picks it up and sends it off to the http client, it gets changed.

Any ideas on what might be happening?

Thanks a lot!

Upvotes: 1

Views: 479

Answers (1)

Martin Blech
Martin Blech

Reputation: 13553

WebKit-based browsers like Safari and Chrome hide XML markup from the rendered text. You should ask the browser to show you the source (Tools->View Source(CTRL+U) in Chrome). Firefox shows XML markup by default.

Anyhow, if you're doing webservice development I'd recommend you to use curl. It will save you a lot of time.

Upvotes: 1

Related Questions