You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sébastien Geindre <se...@meteo.fr> on 2007/01/30 17:51:05 UTC

upload an xml file and parse it in a pipeline

Hi all,

I've a form with an upoad widget.
I'd like to get the xml data which are uploaded and give it to an 
internal pipeline.

What i've done transform xml data :
<information> is transformed to  &lt;information&gt;

anyone could help ?

Thancks

-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre@meteo.fr
05 61 07 84 93




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


Re: upload an xml file and parse it in a pipeline

Posted by Sébastien Geindre <se...@meteo.fr>.
Andre Juffer a écrit :
> Sébastien Geindre wrote:
>> Thanck, it works better !!!!
>>
>> I try an explanation :
>> was it because my xml data where not put in the pipe as SAX event but 
>> as juste one big sax event with all de document inside ?
>
> I guess it is just that the data that you have is treated as a regular 
> string by the internal pipeline.
that's exactly what i've tried to write....but my english is confusing..
thancks again !
>>
>> Merci beaucoup Andre !
>>
>>
>> Andre Juffer a écrit :
>>> Sébastien,
>>>
>>> You could try the following:
>>>
>>> var s = new Packages.java.lang.String("<?xml version='1.0' ?><doc>" 
>>> + your_data + "</doc>");
>>>
>>> var xml = new Packages.org.apache.cocoon.xml.StringXMLizable(s);
>>> var builder = Packages.org.apache.cocoon.xml.dom.DOMBuilder();
>>> xml.toSAX(builder);
>>> var document = builder.getDocument();
>>>
>>> Andre
>>>
>>> Sébastien Geindre wrote:
>>>> Hi all,
>>>>
>>>> I've a form with an upoad widget.
>>>> I'd like to get the xml data which are uploaded and give it to an 
>>>> internal pipeline.
>>>>
>>>> What i've done transform xml data :
>>>> <information> is transformed to  &lt;information&gt;
>>>>
>>>> anyone could help ?
>>>>
>>>> Thancks
>>>>
>>>
>>
>>
>
>


-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre@meteo.fr
05 61 07 84 93




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


Re: upload an xml file and parse it in a pipeline

Posted by Andre Juffer <aj...@sun3.oulu.fi>.
Sébastien Geindre wrote:
> Thanck, it works better !!!!
> 
> I try an explanation :
> was it because my xml data where not put in the pipe as SAX event but as 
> juste one big sax event with all de document inside ?

I guess it is just that the data that you have is treated as a regular 
string by the internal pipeline.
> 
> Merci beaucoup Andre !
> 
> 
> Andre Juffer a écrit :
>> Sébastien,
>>
>> You could try the following:
>>
>> var s = new Packages.java.lang.String("<?xml version='1.0' ?><doc>" + 
>> your_data + "</doc>");
>>
>> var xml = new Packages.org.apache.cocoon.xml.StringXMLizable(s);
>> var builder = Packages.org.apache.cocoon.xml.dom.DOMBuilder();
>> xml.toSAX(builder);
>> var document = builder.getDocument();
>>
>> Andre
>>
>> Sébastien Geindre wrote:
>>> Hi all,
>>>
>>> I've a form with an upoad widget.
>>> I'd like to get the xml data which are uploaded and give it to an 
>>> internal pipeline.
>>>
>>> What i've done transform xml data :
>>> <information> is transformed to  &lt;information&gt;
>>>
>>> anyone could help ?
>>>
>>> Thancks
>>>
>>
> 
> 


-- 
Andre H. Juffer              | Email: Andre.Juffer@oulu.fi
The Biocenter and            | WWW: www.biochem.oulu.fi/Biocomputing/
     the Dep. of Biochemistry | Fax: +358-8-553-1141
University of Oulu, Finland  | Phone: +358-8-553 1161
Triacle Biocomputing         | WWW: www.triacle-bc.com

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


Re: upload an xml file and parse it in a pipeline

Posted by Sébastien Geindre <se...@meteo.fr>.
Thanck, it works better !!!!

I try an explanation :
was it because my xml data where not put in the pipe as SAX event but as 
juste one big sax event with all de document inside ?

Merci beaucoup Andre !


Andre Juffer a écrit :
> Sébastien,
>
> You could try the following:
>
> var s = new Packages.java.lang.String("<?xml version='1.0' ?><doc>" + 
> your_data + "</doc>");
>
> var xml = new Packages.org.apache.cocoon.xml.StringXMLizable(s);
> var builder = Packages.org.apache.cocoon.xml.dom.DOMBuilder();
> xml.toSAX(builder);
> var document = builder.getDocument();
>
> Andre
>
> Sébastien Geindre wrote:
>> Hi all,
>>
>> I've a form with an upoad widget.
>> I'd like to get the xml data which are uploaded and give it to an 
>> internal pipeline.
>>
>> What i've done transform xml data :
>> <information> is transformed to  &lt;information&gt;
>>
>> anyone could help ?
>>
>> Thancks
>>
>


-- 
Sébastien Geindre
DPREVI/AERO/DEV
sebastien.geindre@meteo.fr
05 61 07 84 93




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


Re: upload an xml file and parse it in a pipeline

Posted by Andre Juffer <aj...@sun3.oulu.fi>.
Sébastien,

You could try the following:

var s = new Packages.java.lang.String("<?xml version='1.0' ?><doc>" + 
your_data + "</doc>");

var xml = new Packages.org.apache.cocoon.xml.StringXMLizable(s);
var builder = Packages.org.apache.cocoon.xml.dom.DOMBuilder();
xml.toSAX(builder);
var document = builder.getDocument();

Andre

Sébastien Geindre wrote:
> Hi all,
> 
> I've a form with an upoad widget.
> I'd like to get the xml data which are uploaded and give it to an 
> internal pipeline.
> 
> What i've done transform xml data :
> <information> is transformed to  &lt;information&gt;
> 
> anyone could help ?
> 
> Thancks
> 

-- 
Andre H. Juffer              | Email: Andre.Juffer@oulu.fi
The Biocenter and            | WWW: www.biochem.oulu.fi/Biocomputing/
     the Dep. of Biochemistry | Fax: +358-8-553-1141
University of Oulu, Finland  | Phone: +358-8-553 1161
Triacle Biocomputing         | WWW: www.triacle-bc.com

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