Registro.getUltimoRegistro returns a xml string like "<log><inicio>243543254325</inicio><fin>23485845</fin></log>", the thing is that I don´t want to treat that string as a string, I want it to form part of the xml content of my page, so I can apply a XSL to it, any ideas ?
-----Mensaje original-----
De: Antonio Gallardo Rivera [mailto:[EMAIL PROTECTED]]
Enviado el: Jueves, 17 de Octubre de 2002 04:50 p.m.
Para: [EMAIL PROTECTED]
Asunto: Re: How to append a xml string as content
You have two options, but all the depends of your porpietary function Registro.getUltimoRegistro. I dont know what registro returns......
1-If returns a string, then your code is fine and you can do something like: <texto>
<xsp:expr>
<my_new_tag>
texto
</my_new_tag>
</xsp:expr>
</texto>
2- If you can change the function, you can make use of
org.w3c.dom.DocumentFragment.
(http://xml.apache.org/xerces2-j/javadocs/api/org/w3c/dom/DocumentFragment.html)
Antonio Gallardo
El Jueves, 17 de Octubre de 2002 12:46, Alejandro Raiczyk escribió:
> Hi people, I have this:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!-- CCM -->
> <!-- Autor: Alejandro Raiczyk -->
> <!-- Version: @version $Id: terminos.xsp,v 1.5 2002/10/11 13:50:28
> slombardozzi Exp $ -->
>
> <xsp:page
> language="java"
> xmlns:xsp="http://apache.org/xsp"
>
>
> <xsp:structure>
>
> <xsp:include>ar.com.technisys.ccm.servidor.Registro</xsp:include>
> </xsp:structure>
>
> <pagina>
> <xsp:logic>
> String usuario = request.getParameter("usuario");
> String operador = request.getParameter("operador");
> String texto = null;
> try{
> texto =
> Registro.getUltimoRegistro(usuario,operador);
> }
> catch (Exception e){
> e.printStackTrace();
> }
> </xsp:logic>
> <contenido>
> <usuario><xsp:expr>usuario</xsp:expr></usuario>
> <operador><xsp:expr>operador</xsp:expr></operador>
> <texto><xsp:expr>texto</xsp:expr></texto>
> </contenido>
> </pagina>
> </xsp:page>
>
> Where texto is a xml string, I don´t want to put it like text but xml
> content, how can I do this ?
>
> Thanks in advance
>
> Alejandro D. Raiczyk
> Arquitecto de soluciones
> Desarrollo de Proyectos
> Technisys
> www.technisys.net
> "The First Digital Enabler of Latinamerica"
> Soluciones end-to-end a empresas tradicionales y puntocom que desean
> orientar su estrategia hacia internet
> Tel./Fax: +54(11) 4322-7100 interno 133
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>