Learning to XML with D

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 6 05:35:24 PST 2015


On Friday, 6 February 2015 at 11:39:32 UTC, Chris wrote:
> If you wanna use D for XML parsing, see if you can find a solid 
> 3rd party library in D (have a look at Adam's github page: 
> https://github.com/adamdruppe/, he has some DOM and HTML stuff 
> up there).

Yeah, if you're used to DOM work in Javascript, my dom.d works in 
a familiar way - it offers similar attributes, methods, uses css 
selector syntax if you want, etc.. You can download just that one 
file then build your program like "dmd yourfile.d dom.d" and it 
should just work, it has no outside dependencies.

Mine can do almost any xml, but the out of the box experience is 
focused on HTML. When combined with my characterencodings.d from 
the same repo, it can handle most web pages too, making it useful 
for scraping html sites.

> There is a new xml module in the review queue, but nobody seems 
> to care. I _think_ the reason why nobody really cares is that 
> most people in the D community don't like XML.

I don't have a problem with xml.... but my own lib Works For Me 
(tm) so I don't personally care much about what is or isn't in 
phobos....


More information about the Digitalmars-d-learn mailing list