Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: XML for Delphi XE6 32-bit/64-bit



Permlink Replies: 12 - Last Post: Jun 9, 2014 2:10 PM Last Post By: Joseph Mitzen
Andy Colmes

Posts: 93
Registered: 2/5/98
XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 6:09 PM
I am looking for a straight-forward no frills XML library or component
that allows me to easily form an XML file and to parse it easily as a
means to transfer text (could be long and lengthy) information back
and forth between applications. I would appreciate any recommendation
of such a resource. Or maybe XML is not a good option for my
application?

Thanking you all in advance.

Andy
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 6:19 PM   in response to: Andy Colmes in response to: Andy Colmes
Andy wrote:

I am looking for a straight-forward no frills XML library or component
that allows me to easily form an XML file and to parse it easily as a
means to transfer text (could be long and lengthy) information back
and forth between applications.

Did you try the TXMLDocument framework that is built-in to Delphi? There
are, of course, third-party XML libraries as well.

Or maybe XML is not a good option for my application?

Hard to say without knowing what your application does or what kind of data
it needs to exchange.

--
Remy Lebeau (TeamB)
Andy Colmes

Posts: 93
Registered: 2/5/98
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 7, 2014 8:27 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Hi Remy,

Did you try the TXMLDocument framework that is built-in to Delphi? There
are, of course, third-party XML libraries as well.

I have not tried TXMLDocument in Delphi yet. Any good examples out
there that I can gather?

Hard to say without knowing what your application does or what kind of data
it needs to exchange.

I have text categorized as "Comments" which can carry a fair amount of
text to go with several fields like Name, Code, etc. basically
resembling something for books in libraries where the large text could
be the description of the book or even excerpts. I don't want to
resort to database usage if I can help it. But not sure how this would
affect speed with that much text flying around. Also, is there a
limitation as to the amount of text that can be in an XML file?

Thanks Remy.

Andy
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 12:46 PM   in response to: Andy Colmes in response to: Andy Colmes
Andy wrote:

not sure how this would affect speed with that much text flying around.

That depends on how you are sending it.

Also, is there a limitation as to the amount of text that can be in an
XML file?

Generally just available memory. Working with large XML documents may take
alot of memory, depending on how you are processing the XML. For generating
XML, a DOM tree is usually created before the final XML string is then formatted,
and that tree can take a lot of memory. You might think of serializing your
data to the final XML string directly to avoid needing a tree (TXMLDocument
does not support that). For parsing XML, parsing into a DOM tree can also
take a lot of memory, so you might use a SAX parser instead (TXMLDocument
does not support that).

--
Remy Lebeau (TeamB)
Andy Colmes

Posts: 93
Registered: 2/5/98
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 1:28 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thanks Remy for the pointers. I will search around for a SAX parser in
the meantime. How would one serialize the data and if that is needed,
what third-party XML supports that?

Andy

On Sun, 8 Jun 2014 12:46:43 -0700, Remy Lebeau (TeamB)
<no dot spam at no dot spam dot com> wrote:

Andy wrote:

not sure how this would affect speed with that much text flying around.

That depends on how you are sending it.

Also, is there a limitation as to the amount of text that can be in an
XML file?

Generally just available memory. Working with large XML documents may take
alot of memory, depending on how you are processing the XML. For generating
XML, a DOM tree is usually created before the final XML string is then formatted,
and that tree can take a lot of memory. You might think of serializing your
data to the final XML string directly to avoid needing a tree (TXMLDocument
does not support that). For parsing XML, parsing into a DOM tree can also
take a lot of memory, so you might use a SAX parser instead (TXMLDocument
does not support that).
Haizhou Tang

Posts: 17
Registered: 2/12/06
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 1:56 PM   in response to: Andy Colmes in response to: Andy Colmes
Not too sure your data XML structure. If there is no deep hierarchy in the tree, you may like to try ClientDataSet. It can read XML into a database table or vice versa.
You can easily do many data processing as you do in a table. If your data cannot be easily transformed into a table like format, you have to go with TXMLDocument or third party.
Generally, XML is heavily redundant data structure. Not sure if this helps.

Andy Colmes wrote:
Thanks Remy for the pointers. I will search around for a SAX parser in
the meantime. How would one serialize the data and if that is needed,
what third-party XML supports that?

Andy

On Sun, 8 Jun 2014 12:46:43 -0700, Remy Lebeau (TeamB)
<no dot spam at no dot spam dot com> wrote:

Andy wrote:

not sure how this would affect speed with that much text flying around.

That depends on how you are sending it.

Also, is there a limitation as to the amount of text that can be in an
XML file?

Generally just available memory. Working with large XML documents may take
alot of memory, depending on how you are processing the XML. For generating
XML, a DOM tree is usually created before the final XML string is then formatted,
and that tree can take a lot of memory. You might think of serializing your
data to the final XML string directly to avoid needing a tree (TXMLDocument
does not support that). For parsing XML, parsing into a DOM tree can also
take a lot of memory, so you might use a SAX parser instead (TXMLDocument
does not support that).
Andy Colmes

Posts: 93
Registered: 2/5/98
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 4:48 PM   in response to: Haizhou Tang in response to: Haizhou Tang
Hello Haizhou,

Thank you for the insight on this. ClientDataSet could definitely be
an option.

Andy

On Sun, 8 Jun 2014 13:56:41 -0700, Haizhou Tang <> wrote:

Not too sure your data XML structure. If there is no deep hierarchy in the tree, you may like to try ClientDataSet. It can read XML into a database table or vice versa.
You can easily do many data processing as you do in a table. If your data cannot be easily transformed into a table like format, you have to go with TXMLDocument or third party.
Generally, XML is heavily redundant data structure. Not sure if this helps.

Andy Colmes wrote:
Thanks Remy for the pointers. I will search around for a SAX parser in
the meantime. How would one serialize the data and if that is needed,
what third-party XML supports that?

Andy

On Sun, 8 Jun 2014 12:46:43 -0700, Remy Lebeau (TeamB)
<no dot spam at no dot spam dot com> wrote:

Andy wrote:

not sure how this would affect speed with that much text flying around.

That depends on how you are sending it.

Also, is there a limitation as to the amount of text that can be in an
XML file?

Generally just available memory. Working with large XML documents may take
alot of memory, depending on how you are processing the XML. For generating
XML, a DOM tree is usually created before the final XML string is then formatted,
and that tree can take a lot of memory. You might think of serializing your
data to the final XML string directly to avoid needing a tree (TXMLDocument
does not support that). For parsing XML, parsing into a DOM tree can also
take a lot of memory, so you might use a SAX parser instead (TXMLDocument
does not support that).
Bob Devine

Posts: 107
Registered: 8/16/01
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 1:34 AM   in response to: Andy Colmes in response to: Andy Colmes
I've recently purchased OXml - I haven't widely used it yet but seems
good so far. Also cross-platform in case you head that way in future.

https://www.kluug.at/kluug-net/oxml.php

Cheers, Bob
Andy Colmes

Posts: 93
Registered: 2/5/98
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 1:25 PM   in response to: Bob Devine in response to: Bob Devine
Thanks Bob for the info. Looks promising.

Andy

On Sun, 8 Jun 2014 01:34:42 -0700, Bob Devine <bd at nospam dot net> wrote:

I've recently purchased OXml - I haven't widely used it yet but seems
good so far. Also cross-platform in case you head that way in future.

https://www.kluug.at/kluug-net/oxml.php

Cheers, Bob
David Novo

Posts: 40
Registered: 8/5/07
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 8, 2014 9:13 PM   in response to: Andy Colmes in response to: Andy Colmes
There is also NativeXML http://www.simdesign.nl/xml.html

It used to be commercial, now open source, as the original author got into an accident and open sourced the product. Because of that, support is not great, and improvements are slow. However, the price is right and it is quite a complete package that handles both DOM and SAX parsing. They also have a TReader and TWriter descendent to stream your objects to XML.
Tom Wedge

Posts: 3
Registered: 1/11/01
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 3:13 AM   in response to: David Novo in response to: David Novo
David Novo wrote:

There is also NativeXML http://www.simdesign.nl/xml.html

It used to be commercial, now open source, as the original author got
into an accident and open sourced the product. Because of that,
support is not great, and improvements are slow. However, the price
is right and it is quite a complete package that handles both DOM and
SAX parsing. They also have a TReader and TWriter descendent to
stream your objects to XML.

+1 for NativeXML
Andy Colmes

Posts: 93
Registered: 2/5/98
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 4:52 AM   in response to: David Novo in response to: David Novo
Thanks David for the info. I knew of NativeXML but never really give
it a spin. I will try now.

Andy

On Sun, 8 Jun 2014 21:13:23 -0700, David Novo <> wrote:

There is also NativeXML http://www.simdesign.nl/xml.html

It used to be commercial, now open source, as the original author got into an accident and open sourced the product. Because of that, support is not great, and improvements are slow. However, the price is right and it is quite a complete package that handles both DOM and SAX parsing. They also have a TReader and TWriter descendent to stream your objects to XML.
Joseph Mitzen

Posts: 392
Registered: 6/9/02
Re: XML for Delphi XE6 32-bit/64-bit
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 9, 2014 2:10 PM   in response to: Andy Colmes in response to: Andy Colmes
Call me crazy, but in 2014 shouldn't XML parsing be in the standard library?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02