[fpc-pascal] XML Iteration
Lee Jenkins
lee at datatrakpos.com
Sun May 2 18:07:27 CEST 2010
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.
ReadXML()
ReadXMLFile()
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:
http://wiki.freepascal.org/XML_Tutorial#Create_a_TXMLDocument_from_a_string
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,
Lee
More information about the fpc-pascal
mailing list