Re: Is std.xml seriously broken, or is it me?

2017-07-31 Thread Kagamin via Digitalmars-d-learn
On Sunday, 30 July 2017 at 03:16:35 UTC, Mike wrote: It appears `onStartTag` does not handle the root element. Looks like a bug. Until the module is replaced, bug reports are still accepted for it.

Re: Is std.xml seriously broken, or is it me?

2017-07-30 Thread Joakim via Digitalmars-d-learn
On Sunday, 30 July 2017 at 03:16:35 UTC, Mike wrote: On Sunday, 30 July 2017 at 02:58:09 UTC, Mike wrote: [...] It appears `onStartTag` does not handle the root element. For example, this code seems to work: import std.xml; import std.stdio; void main() { auto parser = new DocumentParse

Re: Is std.xml seriously broken, or is it me?

2017-07-29 Thread Meta via Digitalmars-d-learn
On Sunday, 30 July 2017 at 02:58:09 UTC, Mike wrote: I'm trying to use std.xml, and I can't get it to work. I tried the simplest program I could think of: import std.xml; import std.stdio; void main() { auto parser = new DocumentParser("encoding=\"utf-8\"?>"); parser.onStartTag["device"]

Re: Is std.xml seriously broken, or is it me?

2017-07-29 Thread Mike via Digitalmars-d-learn
On Sunday, 30 July 2017 at 02:58:09 UTC, Mike wrote: import std.xml; import std.stdio; void main() { auto parser = new DocumentParser("encoding=\"utf-8\"?>"); parser.onStartTag["device"] = (ElementParser parser) { writeln("device"); }; parser.parse(); } https://d

Is std.xml seriously broken, or is it me?

2017-07-29 Thread Mike via Digitalmars-d-learn
I'm trying to use std.xml, and I can't get it to work. I tried the simplest program I could think of: import std.xml; import std.stdio; void main() { auto parser = new DocumentParser("encoding=\"utf-8\"?>"); parser.onStartTag["device"] = (ElementParser parser) { writeln("devic