Interface StreamingTransform


public interface StreamingTransform
An application-specific callback called by the node factory of a StreamingPathFilter whenever an element matches the filter's entire location path.

Can operate on the fully build element in arbitrary ways. The underlying behaviour wrt. element/node-mutation and retaining/removing nodes is also explained in

invalid reference
nu.xom.NodeFactory#finishMakingElement(Element)
.
  • Method Summary

    Modifier and Type
    Method
    Description
    Nodes
    transform(Element element)
    Called by the node factory of a StreamingPathFilterwhenever an element matches the filter's entire location path.
  • Method Details

    • transform

      Nodes transform(Element element)
      Called by the node factory of a StreamingPathFilterwhenever an element matches the filter's entire location path.
      Parameters:
      element - The current element (fully build, including its ancestors and descendants) matching the entire location path.
      Returns:
      a node list containing zero or more nodes (the list must not contain nulls). If the returned node list is empty (i.e. contains zero nodes) the current element is thrown away during parsing. The thrown away element is immediately subject to garbage collection. If the returned nodes list is non-empty, the contained nodes are added to the document being build by a
      invalid reference
      nu.xom.Builder
      , replacing the current element.