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.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
12.36. Implementing the SAXVisitor
- To implement a
SAXVisitor
geared towards transforming the serialized form of a fragment, program Smooks so theSAXVisitor
implementation will be writing to theStreamResult
. This is because Smooks supports targeting of multipleSAXVisitor
implementations at a single fragment, but only oneSAXVisitor
is allowed to write to theStreamResult
, per fragment. - If a second
SAXVisitor
attempts to write to theStreamResult
, aSAXWriterAccessException
will result and you will need to modify your Smooks configuration. - To specify the
StreamResult
to write, theSAXVisitor
needs to "acquire ownership" of theWriter
to theStreamResult
. It does this by making a call to theSAXElement.getWriter(SAXVisitor)
method from inside theSAXVisitBefore.visitBefore
methods implementation, passingthis
as theSAXVisitor
parameter.