unescaping xml in XSP-page
Hi all, I have a problem with my xml-string. From a XSP-page i call a JavaClass which makes a SOAP-call. The JavaClass returns a XML document in String type. When i place this string in my page with the '<' and '>' of the XML string are replaced with '<' and '>'. Because of this replacement the transformer doesn't 'recognize' the tags. I tried , unescapeXml, unescapeHtml and even the string.replaceAll() method (:S) but nothing helps. Does anyone knows how to solve this problem or has an idea? Thanks! Erik btw, here is a piece of my XSP code: String xmlString = soapCall.doSOAPCall(); xmlString - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unescaping xml in XSP-page
On 11.02.2004 09:45, Erik Hofstra wrote: Hi all, I have a problem with my xml-string. From a XSP-page i call a JavaClass which makes a SOAP-call. The JavaClass returns a XML document in String type. When i place this string in my page with the '<' and '>' of the XML string are replaced with '<' and '>'. Because of this replacement the transformer doesn't 'recognize' the tags. I tried , unescapeXml, unescapeHtml and even the string.replaceAll() method (:S) but nothing helps. Does anyone knows how to solve this problem or has an idea? Thanks! Erik btw, here is a piece of my XSP code: String xmlString = soapCall.doSOAPCall(); xmlString There are get-xml or getxml elements somewhere. Somebody else can probably tell you how to use them exactly, I never used them. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unescaping xml in XSP-page
I seem to be having a very simular issue. I have a method which returns generated dhtml, and all of the '<' and '>' are also replaced with '<' and '>'. Any ideas? -Mel -Original Message- From: Joerg Heinicke [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 8:58 PM To: [EMAIL PROTECTED] Subject: Re: unescaping xml in XSP-page On 11.02.2004 09:45, Erik Hofstra wrote: > Hi all, > > I have a problem with my xml-string. From a XSP-page i call a JavaClass > which makes a SOAP-call. The JavaClass returns a XML document in > String type. > When i place this string in my page with the '<' and '>' of the > XML string are replaced with '<' and '>'. Because of this replacement > the transformer doesn't 'recognize' the tags. > I tried , unescapeXml, unescapeHtml and even the > string.replaceAll() method (:S) but nothing helps. > > Does anyone knows how to solve this problem or has an idea? > > Thanks! > Erik > > btw, here is a piece of my XSP code: > > String xmlString = soapCall.doSOAPCall(); > > > xmlString There are get-xml or getxml elements somewhere. Somebody else can probably tell you how to use them exactly, I never used them. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: unescaping xml in XSP-page
I was also having a similar problem and like most trawled Google and the news lists looking for an answer. Most topics suggested using include-expr which I tried in the following format _xml As suggested in the posts which didn't work... Also tried _xml & loads of other routes... Eventually I had a look at the util XSLT and found that the string you want included should be specified as an expr attribute as follows:- String _xml = xmlUtil.getXML(_text); This worked great for me so might be worth a try if like myself you have been misled from some posting on the net. Hope this helps Rob > > I seem to be having a very simular issue. > I have a method which returns generated dhtml, and all of the > '<' and '>' > are also replaced with '<' and '>'. Any ideas? > -Mel > > > On 11.02.2004 09:45, Erik Hofstra wrote: > > > Hi all, > > > > I have a problem with my xml-string. From a XSP-page i call > a JavaClass > > which makes a SOAP-call. The JavaClass returns a XML document in > > String type. > > When i place this string in my page with the '<' > and '>' of the > > XML string are replaced with '<' and '>'. Because of this > replacement > > the transformer doesn't 'recognize' the tags. > > I tried , unescapeXml, unescapeHtml and even the > > string.replaceAll() method (:S) but nothing helps. > > > > Does anyone knows how to solve this problem or has an idea? > > > > Thanks! > > Erik > > > > btw, here is a piece of my XSP code: > > > > String xmlString = soapCall.doSOAPCall(); > > > > > > xmlString > > There are get-xml or getxml elements somewhere. Somebody else can > probably tell you how to use them exactly, I never used them. > > Joerg > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unescaping xml in XSP-page
I had to fiddle with it for a while but it does work! thank you very much, this has been very useful. I ending up doing something a little different so here it is incase it can help somdbody else. // content area of xsp // end caviats: 1) the htmlStr has to be a complete, well formated, xml document. with single root element blah blah blah... 2) you may pass in a well formated doc but the includeString method seems to pretty much do whatever the heck it wants too. It looks like it is trying to make 'nice' on what you put in. example. <- this bombed, of course <- this still bombed, huh? <- this worked, but returned <- this works, for me thanks for all of the help everybody! -Mel -Original Message- From: Rob Gregory [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 2:44 PM To: [EMAIL PROTECTED] Subject: AW: unescaping xml in XSP-page I was also having a similar problem and like most trawled Google and the news lists looking for an answer. Most topics suggested using include-expr which I tried in the following format _xml As suggested in the posts which didn't work... Also tried _xml & loads of other routes... Eventually I had a look at the util XSLT and found that the string you want included should be specified as an expr attribute as follows:- String _xml = xmlUtil.getXML(_text); This worked great for me so might be worth a try if like myself you have been misled from some posting on the net. Hope this helps Rob > > I seem to be having a very simular issue. > I have a method which returns generated dhtml, and all of the > '<' and '>' > are also replaced with '<' and '>'. Any ideas? > -Mel > > > On 11.02.2004 09:45, Erik Hofstra wrote: > > > Hi all, > > > > I have a problem with my xml-string. From a XSP-page i call > a JavaClass > > which makes a SOAP-call. The JavaClass returns a XML document in > > String type. > > When i place this string in my page with the '<' > and '>' of the > > XML string are replaced with '<' and '>'. Because of this > replacement > > the transformer doesn't 'recognize' the tags. > > I tried , unescapeXml, unescapeHtml and even the > > string.replaceAll() method (:S) but nothing helps. > > > > Does anyone knows how to solve this problem or has an idea? > > > > Thanks! > > Erik > > > > btw, here is a piece of my XSP code: > > > > String xmlString = soapCall.doSOAPCall(); > > > > > > xmlString > > There are get-xml or getxml elements somewhere. Somebody else can > probably tell you how to use them exactly, I never used them. > > Joerg > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: unescaping xml in XSP-page
Hi In can't unescape XML in my XSP page, even after looking this mail response. for me gives this error org.xml.sax.SAXParseException: Content is not allowed in prolog. _xml contains actually 'hello' I use xmlns:util="http://apache.org/xsp/util/2.0"; Somebody any idea ? Regards, Phil On Wed, 2004-03-10 at 03:44, Rob Gregory wrote: > I was also having a similar problem and like most trawled Google and the > news lists looking for an answer. Most topics suggested using > include-expr which I tried in the following format > > _xml > > As suggested in the posts which didn't work... > > Also tried > _xml > & loads of other routes... > > Eventually I had a look at the util XSLT and found that the string you > want included should be specified as an expr attribute as follows:- > > String _xml = xmlUtil.getXML(_text); > > > This worked great for me so might be worth a try if like myself you have > been misled from some posting on the net. > > Hope this helps > Rob > > > > > I seem to be having a very simular issue. > > I have a method which returns generated dhtml, and all of the > > '<' and '>' > > are also replaced with '<' and '>'. Any ideas? > > -Mel > > > > > > On 11.02.2004 09:45, Erik Hofstra wrote: > > > > > Hi all, > > > > > > I have a problem with my xml-string. From a XSP-page i call > > a JavaClass > > > which makes a SOAP-call. The JavaClass returns a XML document in > > > String type. > > > When i place this string in my page with the '<' > > and '>' of the > > > XML string are replaced with '<' and '>'. Because of this > > replacement > > > the transformer doesn't 'recognize' the tags. > > > I tried , unescapeXml, unescapeHtml and even the > > > string.replaceAll() method (:S) but nothing helps. > > > > > > Does anyone knows how to solve this problem or has an idea? > > > > > > Thanks! > > > Erik > > > > > > btw, here is a piece of my XSP code: > > > > > > String xmlString = soapCall.doSOAPCall(); > > > > > > > > > xmlString > > > > There are get-xml or getxml elements somewhere. Somebody else can > > probably tell you how to use them exactly, I never used them. > > > > Joerg > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: unescaping xml in XSP-page
Sorry for my last email. works fine,the String passed was not well formed XML, that is, there was no root element... Phil On Tue, 2004-07-13 at 18:38, Philippe Guillard wrote: > Hi > > In can't unescape XML in my XSP page, even after looking this mail > response. > for me gives this error > org.xml.sax.SAXParseException: Content is not allowed in prolog. > _xml contains actually 'hello' > I use xmlns:util="http://apache.org/xsp/util/2.0"; > > Somebody any idea ? > > Regards, > > Phil > > On Wed, 2004-03-10 at 03:44, Rob Gregory wrote: > > I was also having a similar problem and like most trawled Google and the > > news lists looking for an answer. Most topics suggested using > > include-expr which I tried in the following format > > > > _xml > > > > As suggested in the posts which didn't work... > > > > Also tried > > _xml > > & loads of other routes... > > > > Eventually I had a look at the util XSLT and found that the string you > > want included should be specified as an expr attribute as follows:- > > > > String _xml = xmlUtil.getXML(_text); > > > > > > This worked great for me so might be worth a try if like myself you have > > been misled from some posting on the net. > > > > Hope this helps > > Rob > > > > > > > > I seem to be having a very simular issue. > > > I have a method which returns generated dhtml, and all of the > > > '<' and '>' > > > are also replaced with '<' and '>'. Any ideas? > > > -Mel > > > > > > > > > On 11.02.2004 09:45, Erik Hofstra wrote: > > > > > > > Hi all, > > > > > > > > I have a problem with my xml-string. From a XSP-page i call > > > a JavaClass > > > > which makes a SOAP-call. The JavaClass returns a XML document in > > > > String type. > > > > When i place this string in my page with the '<' > > > and '>' of the > > > > XML string are replaced with '<' and '>'. Because of this > > > replacement > > > > the transformer doesn't 'recognize' the tags. > > > > I tried , unescapeXml, unescapeHtml and even the > > > > string.replaceAll() method (:S) but nothing helps. > > > > > > > > Does anyone knows how to solve this problem or has an idea? > > > > > > > > Thanks! > > > > Erik > > > > > > > > btw, here is a piece of my XSP code: > > > > > > > > String xmlString = soapCall.doSOAPCall(); > > > > > > > > > > > > xmlString > > > > > > There are get-xml or getxml elements somewhere. Somebody else can > > > probably tell you how to use them exactly, I never used them. > > > > > > Joerg > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]