Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

sxml->xml converts SXML to XML

Parameter Description
lst List with SXML structure
prt Optional: Output port

Example

Example 1: Create a simple html page showing the server's IP address

> (sxml->xml
  `(html (head (title "Server IP Address"))
         (body (h1 "IP Address:")
               (p "My IP is " ,(ipaddr->string (host-ipaddr))))
   ))
<html><head><title>Server IP Address</title></head><body><h1>IP Address:</h1><p>My IP is 142.103.83.211</p></body></html>
Clone this wiki locally