item>xml ( object -- xml )


Vocabulary
xml-rpc

Inputs
objectan object


Outputs
xmlan object


Definition

GENERIC: item>xml ( object -- xml )


Methods

M: array item>xml
[
item>xml 1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag
{ name ~name~ }
{ children ~vector~ }
}
""
}
}
} interpolate-xml
] map 1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;



M: base64 item>xml
string>> >base64 1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;



M: boolean item>xml
"1" "0" ? 1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;



M: float item>xml
number>string 1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;



M: hashtable item>xml
[ struct-member ] { } assoc>map 1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;



M: integer item>xml
dup 31 2^ neg 31 2^ 1 - between?
[ "Integers must fit in 32 bits" throw ] unless 1 nenum T{
xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;



M: string item>xml
1 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { children ~vector~ } }
""
}
}
} interpolate-xml ;