What is phbos' std.xml status

I am working on the start of porting my PHP-based web framework to the d language, and I am having trouble figuring out if you can rely on the std.xml phobos classes to read xml from files and / or streams. It looks like we have replaced std.xml quite a lot of chatter, so even I am considering reprogramming my own proprietary parser 100% d xml.

Since this is a very interesting project, I am not against creating my own wheels, this would be a fun exercise and give me a chance to learn more about the language. On the other hand, if I do not need to collapse on my own, I could work faster and faster.

I will need to support the almost complete xml 1.0 spec , in particular I will need the xml and xincludes namespaces to work correctly. I also want my API to be more or less consistent with PHP DOMDocument , C # System.Xml.XmlDocument and a DOM javascript implementation. especially that the last bit seems to be missing from phobos. Also phobos still seems to be at least somewhat in motion, and I'm not up to speed at the level of the stream in which it is located.

The big question is: is it safe to use parsing tools in phobos' std.xml to provide the lion's share of my requirements, or do I need to write something from the ground? in my own library to be safe?

When responding, please consider my requirements:

  • full xmlns support
  • xincludes
  • should be able to read from a file, stream or line
  • should be as similar as possible to large DOM implementations and specs
+4
source share
2 answers

Do not use std.xml . Besides the fact that this is a terrible library, it will be replaced at some point.

+4
source

std.xml will be replaced. But there is a DOM XML parser for D2, maybe you should try it. This is on github (dom.d): https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff

+2
source

All Articles