toBadgerfish method

String toBadgerfish({
  1. bool useLocalNameForNodes = false,
})

Badgerfish transformer

Implementation

String toBadgerfish({bool useLocalNameForNodes = false}) {
  if (_result == null) {
    throw Xml2JsonException('toBadgerfish - no parse result');
  }

  String json;
  final badgerfishTransformer = _Xml2JsonBadgerfish(useLocalNameForNodes);
  try {
    json = badgerfishTransformer.transform(_result);
  } on Exception catch (e) {
    throw Xml2JsonException('toBadgerfish error => ${e.toString()}');
  }

  return json;
}