From: Huib V. <hhv...@gm...> - 2009-04-29 10:37:16
|
Hi Joop, I'm not exactly sure what you're trying to do, but is seems to me that the httpclient does what it's supposed to do, namely "XML body content will be returned as a Node". Again, I'm not sure. You could try using the transform:transform function in your xquery to create the content you want from the httpclient XML. Regards, Huib. Op 29 apr 2009, om 09:46 heeft Joop Ringelberg het volgende geschreven: > Hello all, > > I need to be able to 'catch' xml content sent from a server as a > string (I cannot influence what is sent. The xml I receive has a > default namespace "http://www.re-phrase.com/klikpraat", but > subelements "sentence" have mixed content with xhtml elements in > them - however, these elements usually have no explicit namespace. > eXist (correctly) puts them in the "http://www.re-phrase.com/ > klikpraat" namespace. So what I want to do is to manipulate the text > of the content before it is interpreted as XML by eXist, that is, > put the sentence explicitly in the "http://www.re-phrase.com/ > klikpraat" namespace and put a default xhtml namespace in it so the > subelements will be in the correct namespace). > > I retrieve the content using the httpclient module. However, I > cannot make it so that the received content is a string - it is > always an element. I use version 1.2.5. The documentation says: > > "XML body content will be returned as a Node, HTML body content will > be tidied into an XML compatible form, a body with mime-type of > "text/..." will be returned as a URLEncoded string, and any other > body content will be returned as xs:base64Binary encoded data." |