Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jumplink/simple-xml-reader-vala
Very Simple XML Reader forked from valadoc
https://github.com/jumplink/simple-xml-reader-vala
Last synced: about 1 month ago
JSON representation
Very Simple XML Reader forked from valadoc
- Host: GitHub
- URL: https://github.com/jumplink/simple-xml-reader-vala
- Owner: JumpLink
- License: gpl-2.0
- Created: 2012-09-25T17:20:50.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-04T22:31:21.000Z (over 10 years ago)
- Last Synced: 2024-10-19T14:59:42.280Z (3 months ago)
- Language: Vala
- Size: 228 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
simple-xml-reader-vala
======================Very Simple XML Reader forked from valadoc
make
make installExample
=======This example outputs the complete xml on the console
```vala
using Sxml;public class Sxml.Example : DataReader, Object {
protected MarkupTokenType current_token {get; set;}
protected MarkupSourceLocation begin {get; set;}
protected MarkupSourceLocation end {get; set;}
protected XmlStreamReader reader {get; set;}
public string path { get; construct set; }public Example (string path, string filename) {
reader = new XmlStreamReader (path+filename);
}
public void parse() {
next();
while (current_token != MarkupTokenType.EOF) {
next();
if(reader.name != "tile") {
print(@"$current_token, name: %s, content: %s\n",reader.name, reader.content);
reader.print_attributes();
}
}
}
}void main () {
Example xml = new Example("test/","testmap.tmx");
xml.parse();
}
```Compile
```
valac --pkg gee-1.0 --pkg Sxml-0.1 example.vala -o example.o
./example.o
```Applied examples
* [girdocumentationimporter.vala](http://git.gnome.org/browse/valadoc/tree/src/libvaladoc/importer/girdocumentationimporter.vala) from valadoc
* [Data Reader Classes](https://github.com/JumpLink/librpg/tree/master/src/XML) from librpgLizenz
======
GNU GPL v2