You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by H....@MI.unimaas.nl on 2003/12/18 16:43:29 UTC

How to convert a hierarchical structure to xml in java?

Hi,

I'm in the middle of building an XSP page that can retrieve information from
my CORBA-based server. I'm now writing a helper class in Java that can take
the output of the server and transform it into something I can easily manage
in the XSP page.
However, I'm stuck. The results are in a hierarchical structure based on
Vector and String or String[]. I want to manipulate this before returning it
to the XSP page, but I don't want to traverse the structure for the
manipulation and then once more in the XSP page to build the XML.

Can anyone help?

Bye, Helma

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: How to convert a hierarchical structure to xml in java?

Posted by Justin Fagnani-Bell <ju...@paraliansoftware.com>.
Helma,

   I don't know that there's anything you can do about that, unless you 
want your helper class to also generate SAX events. Even if you created 
a DOM structure it would have to be traversed to generate a SAX stream.

   How big is this structure? Is traversing it twice that bad?

Justin


On Dec 18, 2003, at 7:43 AM, H.vanderLinden@MI.unimaas.nl wrote:

> Hi,
>
> I'm in the middle of building an XSP page that can retrieve 
> information from
> my CORBA-based server. I'm now writing a helper class in Java that can 
> take
> the output of the server and transform it into something I can easily 
> manage
> in the XSP page.
> However, I'm stuck. The results are in a hierarchical structure based 
> on
> Vector and String or String[]. I want to manipulate this before 
> returning it
> to the XSP page, but I don't want to traverse the structure for the
> manipulation and then once more in the XSP page to build the XML.
>
> Can anyone help?
>
> Bye, Helma
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: How to convert a hierarchical structure to xml in java?

Posted by Werner Guttmann <we...@gmx.net>.
Helma

have a look at the CastorTransfomer (currently still living in the scratchpad folder), as it might provide what you are 
looking for. A general introduction to Castor XML can be found at http://castor.exolab.org.

Werner

On Thu, 18 Dec 2003 16:43:29 +0100, H.vanderLinden@MI.unimaas.nl wrote:

>Hi,
>
>I'm in the middle of building an XSP page that can retrieve information from
>my CORBA-based server. I'm now writing a helper class in Java that can take
>the output of the server and transform it into something I can easily manage
>in the XSP page.
>However, I'm stuck. The results are in a hierarchical structure based on
>Vector and String or String[]. I want to manipulate this before returning it
>to the XSP page, but I don't want to traverse the structure for the
>manipulation and then once more in the XSP page to build the XML.
>
>Can anyone help?
>
>Bye, Helma
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org