Anonymous user
XML/XPath: Difference between revisions
m
Corrected typo. Modified general comment.
(Replaced the wrong solution with a solution which uses "libxml2" as external library.) |
m (Corrected typo. Modified general comment.) |
||
Line 2,476:
Nim standard library provides several modules to process XML, but none to process XPath requests. There is no third party library to do that either.
So we provide here a solution which uses the C "libxml2" library. Nim allows to interface with C with a great flexibility. Declaring the external
For the first request, we use <code>//section[1]/item[1]</code> instead of <code>//item[1]</code> (
<lang Nim>import sequtils, strutils
|