Link to home
Start Free TrialLog in
Avatar of Hamlet081299
Hamlet081299

asked on

XML parser

I need to parse an XML document, but I am finding limitations with the TXMLDocument component in Delphi 6.

I hope that someone can indicate a way around these problems, but if not a suggestion of a good solid alternate XML component will win the points.

Here's a simple example of the kind of document I need to parse...

<template>
<logo/>
<p>Here is some <b>bolded</b> text</p>
<p>A field gets inserted here <field name="afield" width="10" align="right"/></p>
</template>

When I try to traverse the nodes there are problems because of the embedded tags (e.g. <b> inside <p>) that make it hard to get to the text (e.g. the "Here is some " part).

Ideas?
ASKER CERTIFIED SOLUTION
Avatar of freshman3k
freshman3k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hamlet081299
Hamlet081299

ASKER

I'm always a little reluctant to use any sort of third party components, but I'm going to try put the destructor XML parser.  So far it looks promising...
TurboPower at www.turbopower.com has an XML Parser as well.
In the end I have gone back to the built in XML component.  I found that with a bit of tweaking it was able to do what I wanted.

The destructor implementation was okay, but didn;t quite give me the level of control I wanted.