From: "Lionel Crine" <[EMAIL PROTECTED]> > I have an xml document : > > <?xml version="1.0" encoding="UTF-8"?> > <xsp:page xmlns:xsp="http://apache.org/xsp" > xmlns:my_NS="http://www.my_NS.com/my_NS/query/1.0"> > > > <my_NS:document> > <my_NS:query VERSION="2.0" RESULTSPACE="R1"> > <my_NS:property NAME = "DocType"> > <my_NS:elem>DOCUMENT</my_NS:elem> > </my_NS:property> > </my_NS:query> > </my_NS:document> > > </xsp:page> > > > In my transformer I need to get all that si between "<my_NS:document> > </my_NS:document>" tag and put it in a string or a String buffer. > > Which method can do that for me ?
You should implement almost all the methods of ContentHandler interface, such as: startDocument() startElement() characters() endElement() endDocument() etc. and store everything you need into a String buffer. For an example you can take a look at classes in src/java/org/apache/cocoon/transformation/helper/ package. -- Konstantin > > Sax "Characters" method only returns DOCUMENT, but I also need the tags. > > Lionel > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>