Handbook
Glossary
feed>xml ( feed -- xml )
Atom and RSS feed syndication
Prev:
xml>feed ( xml -- feed )
Vocabulary
syndication
Inputs
feed
a
feed
Outputs
xml
a
xml
Word description
Converts a feed to Atom XML form.
Notes
The result of this word can then be passed to
write-xml
, or stored in an HTTP response object.
Definition
USING:
accessors
kernel
present
sequences
xml.data
xml.syntax.private
;
IN:
syndication
:
feed>xml
( feed -- xml )
[
title>>
]
[
url>>
present
]
[
entries>>
[
entry>xml
]
map
]
tri
3
nenum
T{
xml
{
prolog
T{
prolog
{
version
"1.0"
}
{
encoding
"UTF-8"
}
}
}
{
before
V{
}
}
{
body
T{
tag
{
name
T{
name
{
space
""
}
{
main
"feed"
}
{
url
"http://www.w3.org/2005/Atom"
}
}
}
{
attrs
T{
attrs
{
alist ~vector~
}
}
}
{
children
V{
"\n "
~tag~
"\n "
~tag~
"\n "
~interpolated~
"\n "
}
}
}
}
{
after
V{
""
}
}
}
interpolate-xml
;