tags:

views:

272

answers:

6

I'm looking for a xml component/Library which supporting Delphi 2009.

Thanks!

+5  A: 

As far as I know OmniXML fully supports D2009.

gabr
+1  A: 

What about msxml that is included in Delphi2007 ? I assume it also works in D2009.

Roland Bengtsson
+1  A: 

Delphi includes TXMLDocument / IXMLDocument which can use MSXML and other parsers. What else do you need?

Iron
+6  A: 

Delphi ships with TXMLDocument, which is a wrapper that lets you choose between MSXML, Open XML and Xerces XML.

I just import Microsoft's MSXML and use it directly.

Under Component|Import Component..., select Type Library and browse to Microsoft XML. I recommend 6.0, but you can use 4 if you like. Avoid 3 as it wasn't very compliant with the XML standard and very early versions leak memory, and version 5 is only available with Office.

Update

If speed is a big concern, you might want to take a look at SAX (Simple API for XML), which streams the XML instead of building the DOM in memory. This used to be included in MSXML, but I thought I read somewhere that it had been removed in version 6. I usually use the DOM, so I can't recommend a specific SAX parser, but a quick search on SourceForge returns some options.

Bruce McGee
Yes, I know TXMLDocument, but its processing speed is too slow. I just need to generate XML content, and parse XML content, I need the speed to be fast.
Leo
Then I'd look at importing MSXML (instead of using it through TXMLDocument), which is quite fast for DOM processing. If speed is your biggest issue and/or you have really big XML files, look at SAX instead. I'll update my answer.
Bruce McGee
+1  A: 

The Open XML, Alternative Document Object Model (ADOM) is also a great (and 100% Delphi, no ActiveX/COM dependencies) XML library.

It supports Delphi 5, 6, 7, 8, 2005, 2006, 2007 and 2009.

http://www.philo.de/xml/downloads.shtml

ulrichb
A: 

NativeXML from SimDesign supports Delphi 2 -> Delphi 2010.

  • It's native delphi so needs no external dlls.
  • Free with source.
  • Premium support (forum/email) can be purchased.
  • Purchasing gives access to more frequent updates/bug fixes etc.
  • Comes with documentation and examples.

Before finding NativeXML, I looked at several other XML solutions. Some didn't work. Most seemed overly difficult to use compared to my modest XML needs. I only need to parse small XML files for configuration info etc.

In practice I've found NativeXML well designed and easy to use. I strongly recommend checking it out!

Shannon