[fpc-pascal] XML Iteration
Luiz Americo Pereira Camara
luizmed at oi.com.br
Mon May 3 03:42:42 CEST 2010
Lee Jenkins escreveu:
> Frank Church wrote:
>> I am having some problems with XPath.
>> EvaluateXPathExpression raises exceptions with some search strings
>> and I am not sure if it is my limited knowledge of XPath, or a buggy
>> XPath implementation.
>> The attached demo uses the example from
>> http://www.w3schools.com/xpath/xpath_examples.asp and I am running
>> 0.9.28.2 beta on Windows
> I'm trying to put together a simple test application for xpath now and
> I've noticed, there doesn't seem to be a way in fpc xml implementation
> to simply save to a string, an xml document or node.
> All have no implementation to write a value to a string, only Text,
> Stream and File. I have to create an intermediary stream, save it to
> that and then convert that to string or use TStringStream in order to
> convert them to a string. Odd.
> Also the wiki page:
May be this can help you:
procedure Str2XmlFile(var XmlTree: TXMLDocument; const S: String);
Stream := TStringStream.Create(S);
> Is incorrect. The example will error out because the string passed in
> is interpreted as a file path, not as a string representation of an
> xml document.
> Warm Regards,
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal