Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 762 Bytes

README.md

File metadata and controls

30 lines (24 loc) · 762 Bytes

Expat for Dart

license: MIT

Dart FFI bindings to a stream-oriented XML parser library written in C.

Expat excels with files too large to fit RAM, and where performance and flexibility are crucial.

Usage

import 'package:expat/expat.dart';

main() {
  var parser = XmlParser(
    onStartElement: (String element, List<String> attributes) {
      print('onStartElement $element')
    },
    onCharacterData: (String data) {
      print('onCharacterData $data');
    },
    onEndElement: (String element) {
      print('onEndElement $element');
    },
  );
  parser.parse(xml: '<foo>bar</foo>');
  parser.dispose();
}