IF Computer > MINERVA > Manual > Reference > Predicates > XML (eXtended Markup Language) terms > write_xml/1/2

write_xml/1/2

MINERVA
ifcomputer logo
f
Expert Services on the Web

Writes a XML term to a text stream.

write_xml(+XmlTerm)
write_xml(+Stream, +XmlTerm)

write_xml/1 writes the XML term XmlTerm to the current output stream. write_xml/2 writes the XML term XmlTerm to the text stream Stream. For a description of a XML term see read_term/2/3.

Arguments

Stream              text output stream
XmlTerm             term representing an XML term

Examples

write_xml(document(
    [xml([version = '1.0'])],
    element(n1, [a1 = 'x', a2 = 'y'], [
       element(n2, [], [chardata('hello')]),
       element(n3, [a3 = 'z'], [])]),
    [])).

Standard

These predicates are not part of the ISO-Prolog Standard.

See also

read_xml/2/3, write_xml/1/2, term2xml/3, term2xmldoc/3, xml2term/3, xmldoc2term/3.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/XML/write_xml/print_en.html
published 2012/5/21 update 2001/12/14 (c) 1996-2009 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS