cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz "Goliatus" TaƄczyk <>
Subject Parse XML inside XSP
Date Mon, 02 Aug 2004 15:04:12 GMT

  What is the easiest way to get value of xpath from some xml
  included to xsp in this way:
  XSPUtil.includeString(xml, this.manager, this.contentHandler);

  XPathProcessor xpathProcessor = (XPathProcessor)this.manager.lookup(XPathProcessor.ROLE);
  SAXParser parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
  stream = new StringBufferInputStream(xml);
  Element element = DOMUtil.getDocumentFragment(parser, new InputStreamReader(stream)).getOwnerDocument().getDocumentElement();

  I try to do it this(^) way but:

  DOMUtil.getValueOf(element, "/root/value");

  returns null.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message