[fpc-pascal] XML read

Bart bartjunk64 at gmail.com
Mon Jun 13 16:47:27 CEST 2011


I have some code that reads/writes an addressbook in XML format.
I can attach if if you think it may be usefull to you.

Bart

On 6/13/11, Marcos Douglas <md at delfire.net> wrote:
> On Sat, Jun 11, 2011 at 5:52 AM, Michael Van Canneyt
> <michael at freepascal.org> wrote:
>>
>>
>> On Fri, 10 Jun 2011, Marcos Douglas wrote:
>>
>>> Hi,
>>> What is the more simpler way to get all text in each paragraph in the
>>> XML below, using fcl-xml?
>>> For example:
>>>
>>> Page 1
>>> -------------------
>>> Para 1:
>>> -1524
>>> -888
>>> -14/06/06
>>> Para 2
>>> -TEXT 2
>>>
>>> Page 2
>>> -------------------
>>> Para 1
>>> --TEXT page 2
>>>
>>> I need each paragraph in a TStringList.
>>
>> There is no "simple" way. You must walk the nodes and append the text of
>> all <Text> nodes.
>>
>> Or you can try XPath, this should give you all the <Text> nodes, but I am
>> not familiar with the exact structure of XPath.
>
> OK Michael, thanks.
>
> Marcos Douglas
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



More information about the fpc-pascal mailing list