Closed Ssamm45 closed 3 years ago
yeah i could probably just make an accessor.... it was kinda a mistake to make it global, perhaps i should move it to the Document class.
(now technically in xml IIRC <foo/>
is supposed to be totally identical to <foo></foo>
so you can write that way too. but otherwise self closing i think comes off the dtd... just i never parse them...)
I finally added a facility. You can do one of two things:
auto doc = new XmlDocument(); // or new Document, it just has a different default
doc.selfClosedElements ~= "whatever";
doc.parse(...)
or make your own list and pass it to things like Element.make.
docs http://dpldocs.info/experimental-docs/arsd.dom.Document.selfClosedElements.html
http://arsd-official.dpldocs.info/arsd.dom.Element.make.html
etc
When editing XML documents other that HTML there are often self closing tags that are not in current list. It would be useful if it were possible to change what tags are in this list.