From: John Carter Date: 2001-11-15T09:30:19+09:00 Subject: [ruby-talk:25230] Re: XML support in the standard lib;whatexactly? On Thu, 15 Nov 2001, Alan Chen wrote: > On Thu, Nov 15, 2001 at 05:24:35AM +0900, John Carter wrote: > > Am I wrong? Can anyone think of any counter examples? > > How about porting of libraries and components expecting to access XML > via DOM? Right now I'm considering porting XMLtoDBMS - a perl library > that uses XML to ease DBMS access. If there were a DOM interface to > ruby's XML layer, I'm thinking that it would be possible to write a > tool to convert the perl to ruby as a first pass porting > effort. Without, a DOM interface, I need to port all the XML accesses > by hand. I can't say I'm grabbed by this as a counter example. > > Otherwise lets have no more of this "Ruby standard XML library needs to > > have the standard DOM API" talk. > > > > The DOM API is broken by design, built to the lowest common denominator. > > Its a pain and a suffering. > > I'm not saying that ruby needs to only provide access to its XML via > DOM. I don't even think having DOM should be a central priority for > XML parsing in Ruby. But many xml components and libraries which > might be ported to Ruby will be ported more directly if a DOM api > exists in ruby. Because DOM is already familiar to many programmers > outside of Ruby, this also might be a way to attract XML programmers. Ah. Yes. I was familiar with DOM before I came upon Ruby. I've hated DOM from the first time I saw it. (Loved Ruby at first sight though...) I suspect most people who are familiar with DOM and a good OOPS language will look immediately for a better native binding. DOM was self conciously a lowest common denominator requiring little or no language support. > I think theres plenty of room for Ruby to have a ruby-way API as well > as industry standard XML API's. Open source is all about letting > people work in thier area of need/interest and collaborating in a > coordinated fashion. I agree with that wholeheartedly. I just wished to persuade people that DOM is not the way to go. If they go that way, well, sigh!, we'll miss them! John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand Indeed, the first noble truth of Buddhism, usually translated as `all life is suffering,' is more accurately rendered `life is filled with a sense of pervasive unsatisfactoriness.' -- M.D. Epstein