views:

28

answers:

1

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!

+1  A: 

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.

martin
ohh thats indeed what it was. btw, even firefox is hiding the xml markup. thanks anyways... and here I was , sure that the problem is in cherrypy.
MK
@MK: that is a common complaint. Many, many people before you have been sure their problem originated in CherryPy, when it did not. We are therefore working hard to extend CherryPy to replace the rest of the world so that all problems disappear entirely.
fumanchu