cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <mcord...@maine.edu>
Subject Re: Newbie question : String to XML (was getting whole POSTed datas)
Date Thu, 12 Apr 2001 22:36:00 GMT
Hi, 

Just a shot in the dark, but doesn't InputSource(String) 
assume String is a filename?  Perhaps try:

	doc = parser.parse( 
		new InputSource( new StringReader( st )));

-matt





On Fri, Apr 13, 2001 at 12:31:08AM +0200, St?phane Arzt wrote:
> Hello there,
> 
> I reached to extract the content of the datas postd by my Flash file (that
> always use the GET method (Welcome to the 4th Macromedia's Dimension)) by
> writing a servlet.
> It works well but now I have another silly question (sorry Viktor :))
> How may I transform my String <LOGIN password="foo" username="bar"/> into a
> XML document (or Node ??) that I can parse to extract the values of the
> attributes username and password ?
> 
> I tried :
> 
>     public void doVerif(String st) throws SAXException, IOException {
>          DOMParser parser = new DOMParser();
>          Document doc = new Document();
>          InputSource in = new InputSource(st);
> 
>          doc = parser.parse(in);
>     }
> 
> but it always throws me a SAXException.
> 
> 
> I know that this is a silly question for someone uses Cocoon's classes and
> XML Everyday but for me...
> 
> Thanks.
> 
> Stef
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message