p-hatan/ mirror

pub repository

mirror.p-hatan.com

xml2json

3.0.1

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

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.com
flutter pub add xml2json
pubspec.yaml
name: xml2json
version: 3.0.1
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.2'
  #dart_dev: '^2.0.0-alpha'
  dart_style: '^1.1.3'
  dartdoc: '^0.20.3'
  build_runner: '^0.10.0'
  build_test: '^0.10.2'
  build_web_compilers: '^0.4.0'

Version history

VersionPublishedArchiveSHA-256
1.0.02013-09-20T07:48:13.873850ZDownload729f798326dff15f12fbe65ed6925d2771ec7e9bbab003a381cfadc5da2feb23
1.1.02013-10-10T12:48:28.697ZDownload39b03e07e12df09ec30d137b0204d25b63cd12abdf714456c7c285425385bf84
2.0.02013-11-19T11:57:52.824030ZDownloadaf7d3ee636d6a6961a6b130ff2386f8de599ee40396dc89a85cfc002aaec0c2d
2.0.12014-02-14T10:15:52.228780ZDownload169aa9ba386511e2137404ee54f345cbd02032c595d8345c4409ae6895a4da67
2.0.22014-05-22T14:09:00.760400ZDownload40e45618f10eae2ca3dacb0bfc724df80b5b160fd7507ea69b0c03739a42f346
2.0.42014-07-08T06:29:15.359870ZDownloadea270bd76e38671ac68e3fdac2231afba0ee3c8d93022dab7b32ec43f4defd6b
2.0.52014-09-18T10:37:51.833540ZDownloade4b8ebab293b6f5416a652ff2ff89064f2816eeb8b59bb4a3d8058d4ffa92176
2.0.62014-12-31T12:37:35.739920ZDownload49012bfabc097c9c5db32da04a13c36ec1e3971c5914cfa34d0115b90e453915
2.0.72015-08-12T08:42:27.873ZDownload93b8b24b5db0a57c6899e264a412dc784839b2dc9901a4e4fb93b7c9cb8b40d9
2.0.82015-08-20T07:31:43.648ZDownload6a90025d70b064d38ddb13d1597b81ff5743f517ab8d52b667643b89dce7fea8
2.0.92017-07-14T10:33:45.479510ZDownload2b2e6b8e6fd8e956021d65d930c268f339d467cfd887bdd09de40ba09b0e2fdc
2.0.102017-12-11T14:04:50.175107ZDownload9ccc60e39f115a74d8f9e82bb5bf1d640a10ab2d14af820aface6c34154b40f7
2.0.112018-02-16T11:20:51.565371ZDownload2f836ee9babe01ca582d0c310490efac8a1dfebc5d2ed4b8b8ee7e237c2c0ba5
2.0.122018-04-06T14:20:37.570015ZDownloadb5e64856f94c55237b62a70aa980c214efcaefaeb6304612bf48147864aef215
2.0.132018-04-19T07:12:10.350806ZDownloadf10d2f1d4cd36e2573f14d05ed4c4f05b0e6bfadf0ebd1188054aff58121e1b3
2.0.142018-04-24T06:56:00.883699ZDownload05153eb1c8cc6637b87706f94c33e1956c1b31a294e29cee4ffa640e96b41c1d
3.0.02018-08-15T08:00:01.125964ZDownload9210a2bd3ff9e33779d68ac8836e4ca55b5da23c6f1b7cb6138756debe62538b
3.0.12018-08-16T19:20:17.511382ZDownloadfb9b60bfa22feacccb3312958b2554b7a1a97f073e27acefe3382657210fdc51
3.0.22018-10-01T09:13:34.662478ZDownload372702a87a9168110283e5b24259223102afe3295727522ed434f9a111b63404
3.0.32018-10-03T12:15:32.988133ZDownloadac90794420e4506acb1438ceb0559d4b7b876afecd375185b9bc773b03bc8e10
4.0.02019-09-26T09:12:56.493442ZDownloadc9524d8c476b40f703dd1e888b5b446104b322239a4bb331b1ccaa7ec012b3b4
4.1.02019-11-20T13:35:17.452315ZDownload3e78ae1266dd9c32f3010624a2fd1851eb700ba713125af443a2a395b97ac7d0
4.1.12019-12-31T13:38:01.628100ZDownload938c4de54d6106d57daf17b83780024a73986f1ba0bca7571afa44be3c49bdb5
4.2.02020-03-19T15:51:22.746178ZDownloadff568ea424c73e3f95e896d9fef821046d993946514b8f1fc4d4de845e47a828
4.2.12020-07-06T08:56:10.374770ZDownload78a1f838f730205cd27947818b8a06afe87fe8770cd794f6c4fad109da02e597
4.3.02020-07-08T12:57:08.253062ZDownloade1f46670f57776d8b3ba4eff6b1904e168eb49afe762a3700a3e15b079923916
4.4.02020-10-05T12:51:25.539172ZDownload57ff11eece76ec83c8a9a02dd6631b468becd980d82ffada0bb24d5b3ad4b46c
5.0.0-nullsafety.02021-01-07T10:51:35.396651ZDownload1f89b0de93eb927f05f0feef02733522648c49c663389c68f5c06c258ae92d78
5.0.02021-03-04T17:06:37.484546ZDownloadb67f1bdb9a7ad7731c7b38c8c02362011e9ee13a7c722f520dc1f75fccf1d652
5.1.02021-04-22T13:29:02.629798ZDownloadb72ed366b7e8515a66861d7130c0848fabf0876ef05bafd28277aa2069c3ee2d
5.2.02021-05-25T15:19:02.055483ZDownload3ee2d132a22247e7213682c2073d4df6cd1ee63c8860828fd537fe78dc5a6ba2
5.3.02021-06-12T09:41:15.895630ZDownload39aa563d08e1422f348450f5699961afe179bb1cd456020482c7f13196eec41d
5.3.12021-06-16T14:32:03.672363ZDownload3f0ecaccff077b030263c68920d5e38c4d7b5f81f49d338bb8a09fdcd803ec22
5.3.22021-12-15T10:06:56.322179ZDownloadb32ce8fece91ed4967f4b2023df43e9777d7cfbfe4f51e5999c1ca128b60cbf9
5.3.32022-05-28T08:44:31.896799ZDownload6430701d5e7534313e902d46318304d69ecfb26a4f6f102926ea8ab8bdc56ae7
5.3.42022-07-26T08:52:43.852009ZDownload176202b1640b0eadf7a8b6f525424bf8bb2defe66b2e12bfdf05bd83333c1d5d
5.3.52022-09-02T08:32:09.477163ZDownloadbaaed668e6ddd915f4b80a57ea66b601ed469d294f1cf55dc52502f0bf65a70e
5.3.62022-12-25T09:31:38.240304ZDownloadc8cb35b83cce879c2ea86951fd257f4e765b0030a0298b35cf94f2b3d0f32095
6.0.02023-05-14T07:38:14.985304ZDownloadc39bf22898b4458ccca91d5087ba86ebda078f0e2291bd73de80372a37d83e52
6.1.02023-05-26T08:42:16.638532ZDownload12ebc382f8684cafcc1e3ae5c982de82b5a52007a5d0ac79b22745d34f5ba975
6.2.02023-07-19T13:55:35.093355ZDownload1cd5d23474f38e794fbcab262290bc638c59c985c34d29180fc4525eda24ea7d
6.2.12023-11-06T10:23:34.648017ZDownloadffb6dc0132a59b2d10d1716aea34ff53fb0e5b73f46a347d302a1a993ea57675
6.2.22023-12-26T10:36:28.753241ZDownloadd97aed12d54193611c442c268155398f4170b52cfc0058aabbd79160c9c8eefb
6.2.32024-03-24T10:18:53.081890ZDownload52b7c8d350fdce09545b058982c26689ee89f1eb188cc9910d585665bfe27bc0
6.2.42024-09-17T08:11:30.719068ZDownloaddbe79a85d902674d95c7608c8048355ce2ec5846640da1c0f91389ccdad5b5a8
6.2.52024-10-13T09:48:03.811401ZDownload9523203b99032ce419672804010cce72ea47fc277b3135f77bbb7ac8fa391664
6.2.62025-01-11T10:45:53.915069ZDownload9ff65c144a48f7f73d2bd6d919700c7697beced3b51216b982f78c68bc0da142
6.2.72025-04-02T10:31:30.591321ZDownload8a7ae63b76676f083d81287b61f03222952609c0507893bc62e60a4a588a9702
6.2.82026-07-27T10:03:44.927397ZDownload3ce4ee6b7f0302efdbd759ec9f8e3b1f80efcebe7d4817c46c8682a881a2e1f2
6.2.92026-08-03T13:32:18.208154ZDownload0c1cb4e84105bdc3a8c67efc4673d317932f6fd7cc9a46cb4438bea375b7bb9b

Dependencies

xml "\u003e=3.0.0 \u003c4.0.0"