Hi!<br><br>I&#39;m working on a xml parser that inserts data into a sqlite db. The program looks something like this:<br><br>(insert-into-db (get-name doc num) (get-xml doc num))<br><br>where get-name looks like this:<br><br>
(define (get-name doc num)<br>  (srl:sxml-&gt;xml<br>   ((sxpath &quot;tag/tag2[$i]/tag3/name/text()&quot;)<br>       (sxml:document doc)<br>       &#39;[(i . num)])))<br><br>and get-xml looks like this:<br><br>(define (get-xml doc num)<br>
  (srl:sxml-&gt;xml<br>   ((sxpath &quot;tag/tag2[$i]&quot;)<br>       (sxml:document doc)<br>       &#39;[(i . num)]))<br><br>where the xml document looks something like this:<br><br>&lt;?generic xml define..&gt;<br>&lt;some css&gt;<br>
&lt;/css&gt;<br>&lt;tag&gt;<br>&lt;tag2&gt;...&lt;tag3&gt;name&lt;tag3&gt;&lt;tag2&gt;<br>&lt;tag2&gt;...&lt;tag3&gt;name2&lt;tag3&gt;&lt;tag2&gt;<br>...<br>&lt;tag&gt;<br><br>It&#39;s suposed to insert the name thats found in every &lt;tag2&gt; and the whole &lt;tag2&gt; xml string into the database.<br>
<br><br>This turned out to be realy slow when I have a some xml document with a few thousand lines of declarations, it parses the document with one line per second (and yes, I know it&#39;s because it opens up the xml file everytime when it look up something.<br>
But like the newbe that I am I can&#39;t come up with any working design to make it faster. I have looked inte sxml-match and it looks promisin but I don&#39;t realy know how to use it in this project. Does anybody have an idea on how to do this a bit faster?<br>
<br>Kind regards M.<br>