Hi Alex,

what is the way to load an XML file?  I seem to be having problems
with some cases depending on where the ?xml declaration and comments
are:

: (load '@lib/xml.l)
-> attr
: (let F '/tmp/a.xml (call 'cat F) (in F (xml)))
<hi>123</hi>
-> (hi NIL "123")
: (let F '/tmp/b.xml (call 'cat F) (in F (xml)))
<!-- comment -->
<hi>123</hi>
-> NIL
: (let F '/tmp/c.xml (call 'cat F) (in F (xml)))
<?xml version="1.0" encoding="UTF-8"?>
<hi>123</hi>
[/tmp/c.xml:1] ?>\
<hi>123</hi>\
 -- XML parse error
? 
: (let F '/tmp/d.xml (call 'cat F) (in F (xml)))
<?xml version="1.0" encoding="UTF-8"?>
<!-- comment -->
<hi>123</hi>
[/tmp/d.xml:1] ?>\
<!--\ comment\ -->\
<hi>123</hi>\
 -- XML parse error
? 
: (let F '/tmp/e.xml (call 'cat F) (in F (xml)))
<!-- comment -->
<?xml version="1.0" encoding="UTF-8"?>
<hi>123</hi>
-> NIL

I am using picolisp-2.3.2.

Thanks,

Tomas
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to