light_xml_parser

Last updated:

0 purchases

light_xml_parser Image
light_xml_parser Images
Add to Cart

Description:

light xml parser

XML Parser #
A simple lightweight XML parser written in dart.
Inspired from : https://github.com/jonahisadev/littlexml
Usage #
1. Reading / Parsing XML #
XMLDocument doc = XMLDocument.fromString(sampleXMLString);
// or
XMLDocument doc = XMLDocument.readFromFile(path/to/xmlfile.xml);
copied to clipboard
2. Querying #
The XML is parsed into an XMLDocument object. This has the following attributes :-

root (root node) (XMLNode)
encoding (String)
version (String)

All tags are treated as nodes in the XML tree. Each node has the following attributes :-

tag (tag name) (String)
parent (XMLNode)
text (String)
attributes (Map<String, String>)
children (List

doc.root.children[0].tag // prints the tag name of the first tag in the XML
doc.root.children[0].text // prints the inner text in the first tag in the XML
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.