digitalmars.D - Best XML Library
- Meta (5/5) May 23 2013 I'm thinking of starting on a small XMPP-based messaging client
- Timothee Cour (10/14) May 23 2013 what about std.xml for starters ?
- deadalnix (4/9) May 23 2013 Tango.xml is know to be pretty good. std.xml isn't that great
- Dicebot (2/11) May 24 2013 Vibe.d don't have XML module, only Json and Bson.
- Jacob Carlborg (7/11) May 24 2013 The XML package in Tango is the best. Still works even if it's not
- David (3/7) May 24 2013 I recommend you to look at:
- ponce (3/14) May 24 2013 I concur. It works very well for my DOM parser needs.
- Andrea Fontana (4/9) May 24 2013 You should give a try to dom.d by adam ruppe:
- Adam D. Ruppe (4/7) May 24 2013 I don't think it would work best for xmpp though because dom.d
- Steven Schveighoffer (4/11) May 28 2013 AFAIK, Tango's xml is the same.
- Adam D. Ruppe (56/59) May 28 2013 I just decided to write a quick stream like thing, to see if I
- Idan Arye (6/11) May 24 2013 I suggest you check the XMLP library by Michael Rynn. I tried XML
- Meta (2/7) May 25 2013 That is a good point. I suppose I'll take a look at that and
- michaelc37 (6/11) Jun 13 2013 Some time ago, I contacted the xmlp developers about this type of
- qznc (4/9) Jun 14 2013 Additional requirement: You need a streaming XML parser (aka
- Jacob Carlborg (4/7) Jun 14 2013 --
I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?
May 23 2013
what about std.xml for starters ? it is criticized and in need of overhaul though. I've used http://vipbase.net/xmlparser/ and I liked it; here's the description: XmlParser is a lightweight open source C++ library based on Apache's Xerces C++ Parser <http://xml.apache.org/xerces-c/>. XmlParser contains only two files (one .cpp and one .h) and provides simple API for parsing XML files. XmlParser supports charsets such as GB2312. it's only 2 files and should be easy to port to D. On Thu, May 23, 2013 at 3:22 PM, Meta <jared771 gmail.com> wrote:I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?
May 23 2013
On Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote:I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?Tango.xml is know to be pretty good. std.xml isn't that great performance and API wize. I know vibe propose something, but I am unsure how good it is.
May 23 2013
On Friday, 24 May 2013 at 03:04:17 UTC, deadalnix wrote:On Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote:Vibe.d don't have XML module, only Json and Bson.I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?Tango.xml is know to be pretty good. std.xml isn't that great performance and API wize. I know vibe propose something, but I am unsure how good it is.
May 24 2013
On 2013-05-24 00:22, Meta wrote:I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?The XML package in Tango is the best. Still works even if it's not maintained. It won't compile with the latest beta of DMD but it does compile with the latest version, 2.062. I'll have dependencies on Tango so I'll probably maintained if no one else does it. -- /Jacob Carlborg
May 24 2013
Am 24.05.2013 00:22, schrieb Meta:I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?I recommend you to look at: http://opticron.no-ip.org/svn/branches/kxml/
May 24 2013
On Friday, 24 May 2013 at 11:07:02 UTC, David wrote:Am 24.05.2013 00:22, schrieb Meta:I concur. It works very well for my DOM parser needs. Filtering on XPath makes it very easy to do anything.I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?I recommend you to look at: http://opticron.no-ip.org/svn/branches/kxml/
May 24 2013
On Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote:I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?You should give a try to dom.d by adam ruppe: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff You just need dom.d and charactersencoding.d
May 24 2013
On Friday, 24 May 2013 at 12:56:54 UTC, Andrea Fontana wrote:On Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote:I'm thinking of starting on a small XMPP-based messagingYou should give a try to dom.d by adam ruppe:I don't think it would work best for xmpp though because dom.d needs the entire file before it can parse, and xmpp is a stream of data.
May 24 2013
On Fri, 24 May 2013 10:18:37 -0400, Adam D. Ruppe <destructionator gmail.com> wrote:On Friday, 24 May 2013 at 12:56:54 UTC, Andrea Fontana wrote:AFAIK, Tango's xml is the same. -SteveOn Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote:I'm thinking of starting on a small XMPP-based messagingYou should give a try to dom.d by adam ruppe:I don't think it would work best for xmpp though because dom.d needs the entire file before it can parse, and xmpp is a stream of data.
May 28 2013
On Friday, 24 May 2013 at 14:18:38 UTC, Adam D. Ruppe wrote:I don't think it would work best for xmpp though because dom.d needs the entire file before it can parse, and xmpp is a stream of data.I just decided to write a quick stream like thing, to see if I can, and it actually kinda works. My dom.d is still NOT an ideal choice for xmpp, I was just wondering if I could do this easily and figured I'd share the results. dom.d https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/dom.d also needs characterencodings.d from that same github. === import arsd.dom; import std.stdio; void main() { auto document = new Document(); document.eventObservers ~= delegate(DomMutationEvent event) { if(event.operation == DomMutationOperations.appendChild) { auto element = event.related; if(element.tagName == "cool") writeln("GOT: " ~ element.toString()); } }; document.parseStream(new Utf8Stream(delegate string() { return readln(); }, delegate bool() { return stdin.isOpen; }), true, true); } === $ dmd streamtest.d dom.d characterencodings.d <test> <cool>sweet</cool> </test> The parse function expected a complete string, and I didn't signficantly modify it. Instead I created a class Utf8Stream that overloads enough operators that it can pretend to be a string, but one that can fetch more data when its length is checked and it is close to the last index fetched (the parse function checks data.length often to avoid going out of bounds, and it fetches chars by opIndex one at a time, so it works here, but wouldn't likely work elsewhere. Heck it might even break with non-ascii input, I haven't tried that yet) So yeah pretty hacky, but since it internally builds the tree and fires off these mutation event things, you can hook into that and react as it is built, accomplishing the task at hand, more or less. But since it is still building a big old dom and appending strings internally, it will be a bit of a memory hog as time goes on, and performance may not be great. It also works better in strict mode (The true, true on the parse function argument list does this) than garbage mode when streaming. Like I said, dom.d still isn't my first choice for xmpp or any other enormous xml parsing task, but hey it kinda works and is fairly convenient so if this looks useful to you, have fun!
May 28 2013
On Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote:I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?I suggest you check the XMLP library by Michael Rynn. I tried XML processing with D, so I don't know how good the different libraries are, but XMLP is on the review queue, which means it's highly possible it will become Phobos' standard XML library, and when that happens you will have an easy migration.
May 24 2013
I suggest you check the XMLP library by Michael Rynn. I tried XML processing with D, so I don't know how good the different libraries are, but XMLP is on the review queue, which means it's highly possible it will become Phobos' standard XML library, and when that happens you will have an easy migration.That is a good point. I suppose I'll take a look at that and Tango's XML package.
May 25 2013
On Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote:I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?Some time ago, I contacted the xmlp developers about this type of parsing. They made some changes and shared these links with me. http://bazaar.launchpad.net/~michael-rynn-500/d2-xml/d2-xml-dev/view/head:/alt/jabber.d http://bazaar.launchpad.net/~michael-rynn-500/d2-xml/d2-xml-dev/view/head:/test/jclient.d http://bazaar.launchpad.net/~michael-rynn-500/d2-xml/d2-xml-dev/view/head:/test/jserver.d
Jun 13 2013
On Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote:I'm thinking of starting on a small XMPP-based messaging client and server, which would necessitate quite an extensive use of XML. Since Tango is no longer being maintained, and Vibe.d doesn't support XML (as far as I know), what would be the best option for XML capabilities?Additional requirement: You need a streaming XML parser (aka event-based or SAX). Is it Open Source? I was thinking about doing something similar.
Jun 14 2013
On 2013-06-14 10:49, qznc wrote:Additional requirement: You need a streaming XML parser (aka event-based or SAX).Tango has a SAX parser.Is it Open Source? I was thinking about doing something similar.-- /Jacob Carlborg
Jun 14 2013