Hunt XML released 1.0.0 rc! Support for parsing, encoding, serialize, unserialize, object binding ..
zoujiaqing
zoujiaqing at gmail.com
Thu Dec 5 15:55:29 UTC 2019
# Hunt-XML
A XML library for D Programming Language. Support for parsing,
encoding, serialize, unserialize, object binding!
## Features
* DOM parser: parse XML Document
* DOM writer: to string and to file
* Object serialization/deserialization
### Sample code for parsing
```D
import hunt.xml;
void main()
{
Document doc = Document.parse("<single-element attr1='one'
attr2=\"two\"/>");
if(doc.validate())
{
auto node = doc.firstNode();
writeln(node.getName()); // print single-element
}
}
```
### Sample code for File load / save
```D
import hunt.xml;
void main()
{
Document document = Document.load("resources/books.xml");
document.save("output.xml");
}
```
Source code repository:
https://github.com/huntlabs/hunt-xml
DLang package:
https://code.dlang.org/packages/hunt-xml
More information about the Digitalmars-d-announce
mailing list