Class XMLToJsonFn

All Implemented Interfaces:
Callable, PushableFunction, Function, GroundedValue, Item, Sequence

public class XMLToJsonFn extends SystemFunction implements PushableFunction
Implement the XML to JSON conversion as a built-in function - fn:xml-to-json()
  • Constructor Details

    • XMLToJsonFn

      public XMLToJsonFn()
  • Method Details

    • makeOptionsParameter

      public static OptionsParameter makeOptionsParameter()
    • call

      public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
      Description copied from interface: Function
      Invoke the function
      Specified by:
      call in interface Callable
      Specified by:
      call in interface Function
      Parameters:
      context - the XPath dynamic evaluation context
      arguments - the actual arguments to be supplied
      Returns:
      the result of invoking the function
      Throws:
      XPathException - if a dynamic error occurs within the function
    • process

      public void process(Outputter destination, XPathContext context, Sequence[] arguments) throws XPathException
      Description copied from interface: PushableFunction
      Evaluate the function in "push" mode
      Specified by:
      process in interface PushableFunction
      Parameters:
      destination - the destination for the function result
      context - the dynamic evaluation context
      arguments - the supplied arguments to the function
      Throws:
      XPathException - if a dynamic error occurs during the evaluation
    • getStreamerName

      public String getStreamerName()
      Description copied from class: SystemFunction
      Get a name that identifies the class that can be used to evaluate this function in streaming mode, that is, supplying one item or event at a time as it is delivered by the parser. Special streaming support is generally available in Saxon-EE for all system functions that take a sequence as their argument.
      Overrides:
      getStreamerName in class SystemFunction
      Returns:
      a name that identifies a class that supports streamed evaluation of this system function, or null if no such class is available. The mapping of names to classes is defined in the Saxon-EE class StreamerMap. In non-streaming Saxon editions (HE and PE) the method always returns null.