Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.此内容没有您所选择的语言版本。
12.36. Implementing the SAXVisitor
- To implement a
SAXVisitorgeared towards transforming the serialized form of a fragment, program Smooks so theSAXVisitorimplementation will be writing to theStreamResult. This is because Smooks supports targeting of multipleSAXVisitorimplementations at a single fragment, but only oneSAXVisitoris allowed to write to theStreamResult, per fragment. - If a second
SAXVisitorattempts to write to theStreamResult, aSAXWriterAccessExceptionwill result and you will need to modify your Smooks configuration. - To specify the
StreamResultto write, theSAXVisitorneeds to "acquire ownership" of theWriterto theStreamResult. It does this by making a call to theSAXElement.getWriter(SAXVisitor)method from inside theSAXVisitBefore.visitBeforemethods implementation, passingthisas theSAXVisitorparameter.