How to simply parse and print the XML with dxml?

2021-09-09 Thread tastyminerals via Digitalmars-d-learn
Maybe I missed something obvious in the docs but how can I just parse the XML and print its content? ``` import dxml.parser; auto xml = parseXML!simpleXML(layout); xml.map!(e => e.text).join.writeln; ``` throws

Re: How to simply parse and print the XML with dxml?

2021-09-09 Thread Adam D Ruppe via Digitalmars-d-learn
On Thursday, 9 September 2021 at 17:17:23 UTC, tastyminerals wrote: Maybe I missed something obvious in the docs but how can I just parse the XML and print its content? idk how to use dxml but my dom.d makes these things trivial http://arsd-official.dpldocs.info/arsd.dom.html

Re: How to simply parse and print the XML with dxml?

2021-09-09 Thread jfondren via Digitalmars-d-learn
On Thursday, 9 September 2021 at 17:17:23 UTC, tastyminerals wrote: Maybe I missed something obvious in the docs but how can I just parse the XML and print its content? ``` import dxml.parser; auto xml = parseXML!simpleXML(layout); xml.map!(e => e.text).join.writeln; ``` throws

Re: How to simply parse and print the XML with dxml?

2021-09-09 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Thursday, 9 September 2021 at 17:17:23 UTC, tastyminerals wrote: Maybe I missed something obvious in the docs but how can I just parse the XML and print its content? ``` import dxml.parser; auto xml = parseXML!simpleXML(layout); xml.map!(e => e.text).join.writeln; ``` throws

Re: How to simply parse and print the XML with dxml?

2021-09-09 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 9 September 2021 at 18:40:53 UTC, jfondren wrote: On Thursday, 9 September 2021 at 17:17:23 UTC, tastyminerals wrote: [...] dxml.parser is a streaming XML parser. The documentation at http://jmdavisprog.com/docs/dxml/0.4.0/dxml_parser.html has a link to more information about

Re: How to simply parse and print the XML with dxml?

2021-09-09 Thread jfondren via Digitalmars-d-learn
On Thursday, 9 September 2021 at 23:29:56 UTC, Imperatorn wrote: On Thursday, 9 September 2021 at 18:40:53 UTC, jfondren wrote: On Thursday, 9 September 2021 at 17:17:23 UTC, tastyminerals wrote: [...] dxml.parser is a streaming XML parser. The documentation at

Re: Curious effect with traits, meta, and a foreach loop ... mystifies me.

2021-09-09 Thread james.p.leblanc via Digitalmars-d-learn
On Thursday, 9 September 2021 at 05:37:35 UTC, Tejas wrote: On Thursday, 9 September 2021 at 05:32:29 UTC, Tejas wrote: On Tuesday, 7 September 2021 at 17:47:15 UTC, james.p.leblanc wrote: [...] writeln([0]); scope(exit) AlignedMallocator.instance.deallocate(buffer); //... } ```