* Philippe LAPLANCHE:
> Maintenant comment puis-je faire si dans le contenu de la
> requête post, se trouvent des données au format xml ? Est-il
> possible de parser ces données directement depuis mon xsp ?
Un exemple en FlowScript:
/**
* Parse given string and returns an XML document
*/
function loadDocumentFromString(serializedContent)
{
var parser = null;
try
{
parser =
cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE);
var input = new
java.io.ByteArrayInputStream(serializedContent.getBytes())
var is = new Packages.org.xml.sax.InputSource(input);
return parser.parseDocument(is);
}
finally
{
cocoon.releaseComponent(parser);
}
}
Je te laisse faire la traduction en Java pour XSP à titre
d'exercice ;)
--
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/
---------------------------------------------------------------------
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]