Solved

XML parser

Posted on 2002-06-19
4
506 Views
Last Modified: 2010-04-04
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?
0
Comment
Question by:Hamlet081299
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
freshman3k earned 100 total points
Comment Utility
0
 
LVL 5

Author Comment

by:Hamlet081299
Comment Utility
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...
0
 
LVL 6

Expert Comment

by:tecbuilder
Comment Utility
TurboPower at www.turbopower.com has an XML Parser as well.
0
 
LVL 5

Author Comment

by:Hamlet081299
Comment Utility
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.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now