[fpc-pascal] XML read

Marcos Douglas md at delfire.net
Mon Jun 13 16:15:01 CEST 2011


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



More information about the fpc-pascal mailing list