Viewing version 4.0.0. Open the latest package page.

xml2json

4.0.0

An XML to JSON conversion package. Supports Badgerfish, GData and Parker conversions.

Download archive

Readme

xml2json

Build Status

An XML to JSON conversion package.

This package allows the parsing of XML strings and the transformation of the resulting parse tree into the following XML JSON conventions :-

  1. Parker
  2. Badgerfish
  3. Google Data(GData).

The package uses the xml parser to peform the parsing of XML data into a parse tree.

Exact transforming rules can be found in the 'Transforming Details' document in the docs folder.

The Parker convention is a lossy but lean conversion from XML into JSON, ideal for lightweight XML parsing of collections of books, records etc. where attributes and namespace information is not needed.

Badgerfish and GData both preserve XML information such as attributes and namespaces. These are more suited to heavyweight XML parsing of say ATOM feeds where this information may be needed.

See the main Xml2Json class for usage.

Changelog

4.0.0

Issue 17, License is now MIT, small tidy ups

3.0.3

Update testing, new linter rules

3.0.2

Update testing, run browser tests on Travis

3.0.1

Issue 15, relax sdk constraints for flutter

3.0.0

Issue 14, update to Dart 2

2.0.14

Issue 12, update to latest XML package

2.0.13

Issue 11, exception message bug

2.0.12

Remove dev infinity constraint on the Dart SDK for Flutter

2.0.11

Pub updates

2.0.10

Rename the analysis options file

2.0.9

Issue 9, SDK version constraint update, general pre Dart 2.0 spruce up

2.0.8

Issue 8, correctly escape CDATA strings for JSON

2.0.7

Issue 7, CDATA nodes now translated for Badgerfish and GData.

2.0.6

Use the new XML Package, update to latest Petit Parser see issue 5 in github.

Remove Drone IO integration, now done by pub.

2.0.5

Integrate with Dart's Drone IO testing

2.0.4

Browser is now a dev dependancy

2.0.3

Fixes for Dart V1.5 usage

2.0.2

Remove references to runtime type

2.0.1

Update dependencies to latest

2.0.0

Updates for Dart 1.0 release

1.1.0

  • Fix the runtime type name change intoroduced in Dart r28101
  • Generate API documents
  • Package formatting updates

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'xml2json:4.0.0'
pubspec.yaml
name: xml2json
version: 4.0.0
author: S. Hamblett <steve.hamblett@linux.com>
description: An XML to JSON conversion package. Supports Badgerfish, GData and Parker conversions.
homepage: https://github.com/shamblett/xml2json

environment:
  sdk: ">=2.0.0-dev <3.0.0"

dependencies:
  xml: '>=3.0.0 <4.0.0'

dev_dependencies:
  test: '^1.3.0'
  coverage: '^0.12.3'
  dart_dev: '^2.0.1'
  dart_style: '^1.1.3'
  build_runner: '^1.3.1'
  build_test: '^0.10.6'
  build_web_compilers: '^1.2.0'

Version history

VersionPublishedArchiveSHA-256
1.0.0Cached · Upstream SHA-256 matchedDownload729f7983…2feb23
1.1.0Cached · Upstream SHA-256 matchedDownload39b03e07…85bf84
2.0.0Cached · Upstream SHA-256 matchedDownloadaf7d3ee6…ec0c2d
2.0.1Cached · Upstream SHA-256 matchedDownload169aa9ba…a4da67
2.0.2Cached · Upstream SHA-256 matchedDownload40e45618…42f346
2.0.4Cached · Upstream SHA-256 matchedDownloadea270bd7…defd6b
2.0.5Cached · Upstream SHA-256 matchedDownloade4b8ebab…a92176
2.0.6Cached · Upstream SHA-256 matchedDownload49012bfa…453915
2.0.7Cached · Upstream SHA-256 matchedDownload93b8b24b…8b40d9
2.0.8Cached · Upstream SHA-256 matchedDownload6a90025d…e7fea8
2.0.9Cached · Upstream SHA-256 matchedDownload2b2e6b8e…0e2fdc
2.0.10Cached · Upstream SHA-256 matchedDownload9ccc60e3…4b40f7
2.0.11Cached · Upstream SHA-256 matchedDownload2f836ee9…2c0ba5
2.0.12Cached · Upstream SHA-256 matchedDownloadb5e64856…aef215
2.0.13Cached · Upstream SHA-256 matchedDownloadf10d2f1d…21e1b3
2.0.14Cached · Upstream SHA-256 matchedDownload05153eb1…b41c1d
3.0.0Cached · Upstream SHA-256 matchedDownload9210a2bd…62538b
3.0.1Cached · Upstream SHA-256 matchedDownloadfb9b60bf…0fdc51
3.0.2Cached · Upstream SHA-256 matchedDownload372702a8…b63404
3.0.3Cached · Upstream SHA-256 matchedDownloadac907944…bc8e10
4.0.0Cached · Upstream SHA-256 matchedDownloadc9524d8c…12b3b4
4.1.0Cached · Upstream SHA-256 matchedDownload3e78ae12…7ac7d0
4.1.1Cached · Upstream SHA-256 matchedDownload938c4de5…49bdb5
4.2.0Cached · Upstream SHA-256 matchedDownloadff568ea4…47a828
4.2.1Cached · Upstream SHA-256 matchedDownload78a1f838…02e597
4.3.0Cached · Upstream SHA-256 matchedDownloade1f46670…923916
4.4.0Cached · Upstream SHA-256 matchedDownload57ff11ee…d4b46c
5.0.0-nullsafety.0Cached · Upstream SHA-256 matchedDownload1f89b0de…e92d78
5.0.0Cached · Upstream SHA-256 matchedDownloadb67f1bdb…f1d652
5.1.0Cached · Upstream SHA-256 matchedDownloadb72ed366…c3ee2d
5.2.0Cached · Upstream SHA-256 matchedDownload3ee2d132…5a6ba2
5.3.0Cached · Upstream SHA-256 matchedDownload39aa563d…eec41d
5.3.1Cached · Upstream SHA-256 matchedDownload3f0ecacc…03ec22
5.3.2Cached · Upstream SHA-256 matchedDownloadb32ce8fe…60cbf9
5.3.3Cached · Upstream SHA-256 matchedDownload6430701d…c56ae7
5.3.4Cached · Upstream SHA-256 matchedDownload176202b1…3c1d5d
5.3.5Cached · Upstream SHA-256 matchedDownloadbaaed668…65a70e
5.3.6Cached · Upstream SHA-256 matchedDownloadc8cb35b8…f32095
6.0.0Cached · Upstream SHA-256 matchedDownloadc39bf228…d83e52
6.1.0Cached · Upstream SHA-256 matchedDownload12ebc382…5ba975
6.2.0Cached · Upstream SHA-256 matchedDownload1cd5d234…24ea7d
6.2.1Cached · Upstream SHA-256 matchedDownloadffb6dc01…a57675
6.2.2Cached · Upstream SHA-256 matchedDownloadd97aed12…c8eefb
6.2.3Cached · Upstream SHA-256 matchedDownload52b7c8d3…e27bc0
6.2.4Cached · Upstream SHA-256 matchedDownloaddbe79a85…d5b5a8
6.2.5Cached · Upstream SHA-256 matchedDownload9523203b…391664
6.2.6Cached · Upstream SHA-256 matchedDownload9ff65c14…0da142
6.2.7Cached · Upstream SHA-256 matchedDownload8a7ae63b…8a9702
6.2.8Cached · Upstream SHA-256 matchedDownload3ce4ee6b…a2e1f2
6.2.9Cached · Upstream SHA-256 matchedDownload0c1cb4e8…b7bb9b

Dependencies

xml "\u003e=3.0.0 \u003c4.0.0"