How to simply parse and print the XML with dxml?

jfondren julian.fondren at gmail.com
Thu Sep 9 23:42:42 UTC 2021


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 
>> http://jmdavisprog.com/docs/dxml/0.4.0/dxml_parser.html has a 
>> link to more information about this at the top, behind 'StAX'. 
>> Thus, when you're mapping over `xml`, you're not getting 
>> `<a>some text</a>` at a time, but `<a>`, `some text`, and 
>> `</a>` separately, as they're parsed. The `<a>` there is an 
>> `elementStart` which lacks a `text`, hence the error.
>>
>> [...]
>
> That's a nice trick you did there

Something in the quoted text?

Or if you mean the self-string-importing script that uses the 
content after `__EOF__` , yeah, that's in imitation of Perl's 
`__DATA__` https://perldoc.perl.org/perldata#Special-Literals


More information about the Digitalmars-d-learn mailing list