How to apply list of xml parse settings to xml-type-tags in a function? (solution: use eval)

Q&A's, tips, howto's
Locked
IVShilov
Posts: 23
Joined: Wed Apr 12, 2017 1:58 am

How to apply list of xml parse settings to xml-type-tags in a function? (solution: use eval)

Post by IVShilov »

Hi.
I try to wrap (xml-type-tags) and (xml-parse) into one safe function without side effects.
So I have to pass params to it.
Problem with applying param to (xml-type-tags) in function:

Code: Select all

(xml-type-tags nil nil nil nil)
(xml-parse {<br/>} 31)
returns ((br))
but

Code: Select all

(apply xml-type-tags '(nil nil nil nil))
(xml-parse {<br/>} 31)
returns ((nil br ())) .
[ newLISP v.10.7.5 64-bit on Windows IPv4/6 UTF-8 libffi ]
Attachments
Text copy of newlisp-shell goes to &quot;Internal server error&quot; reply
Text copy of newlisp-shell goes to "Internal server error" reply
2021-09-13_14-25-55_003005_Window - .png (5.25 KiB) Viewed 1947 times
Last edited by IVShilov on Tue Sep 21, 2021 10:34 am, edited 1 time in total.

IVShilov
Posts: 23
Joined: Wed Apr 12, 2017 1:58 am

Re: How to apply list of xml parse settings to xml-type-tags in a function?

Post by IVShilov »

A solution found (sorry, attach a picture because of forum internal errors).
Attachments
2021-09-21_13-26-20_003047_newlispfanclub.alh.net - Post a reply - Pale Moon - .png
2021-09-21_13-26-20_003047_newlispfanclub.alh.net - Post a reply - Pale Moon - .png (5.88 KiB) Viewed 1872 times

Locked