
* Reece Dunn <msclrhd@hotmail.com> [2005-11-01 13:17]:
Cromwell Enage wrote:
--- Stefan Seefeld wrote:
This is simply to see whether there is still any interest into such an API, and to get some discussion on the design.
Count me in as an interested party.
And me :).
One thing that I would like to see is the use of [] for performing XPath queries, e.g.:
xmldom << L"<xml-data>...</xml-data>"; // set xml
std::cout << "found " << xmldom[ L"xml-data/foo/@bar" ];
With current technologies like Lambda and Spirit, we can make a streamlined XML API that fits in with C++ paradigms.
This is nice syntax for both parsing and xquery. I'd suggest syntax that returns an axis as well. axis decendent_or_self = xmldom[ L"/xml/foo" ].decendent_or_self; for (i = decendent_or_self.begin(); i != decendent_or_self.end(); i++) { node n = *i; if (n.namespace_uri() != null) { std::cout << n.namespace_uri() << "\n"; } } Excuse my C++. I'm rusty. -- Alan Gutierrez - alan@engrm.com - http://engrm.com/blogometer/