]> gitweb.factorcode.org Git - factor.git/blob - basis/xml/writer/writer-docs.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / basis / xml / writer / writer-docs.factor
1 ! Copyright (C) 2005, 2009 Daniel Ehrenberg
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: help.syntax help.markup io strings ;
4 IN: xml.writer
5
6 ABOUT: "xml.writer"
7
8 ARTICLE: "xml.writer" "Writing XML"
9     "These words are used in implementing prettyprint"
10     { $subsection write-xml-chunk }
11     "These words are used to print XML normally"
12     { $subsection xml>string }
13     { $subsection write-xml }
14     { $subsection print-xml }
15     "These words are used to prettyprint XML"
16     { $subsection pprint-xml>string }
17     { $subsection pprint-xml>string-but }
18     { $subsection pprint-xml }
19     { $subsection pprint-xml-but } ;
20
21 HELP: write-xml-chunk
22 { $values { "object" "an XML element" } }
23 { $description "writes an XML element to " { $link output-stream } "." }
24 { $see-also write-xml-chunk write-xml } ;
25
26 HELP: xml>string
27 { $values { "xml" "an xml document" } { "string" "a string" } }
28 { $description "converts an XML document into a string" }
29 { $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
30
31 HELP: pprint-xml>string
32 { $values { "xml" "an xml document" } { "string" "a string" } }
33 { $description "converts an XML document into a string in a prettyprinted form." }
34 { $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
35
36 HELP: write-xml
37 { $values { "xml" "an XML document" } }
38 { $description "prints the contents of an XML document to " { $link output-stream } "." }
39 { $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
40
41 HELP: print-xml
42 { $values { "xml" "an XML document" } }
43 { $description "prints the contents of an XML document to " { $link output-stream } ", followed by a newline" }
44 { $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
45
46 HELP: pprint-xml
47 { $values { "xml" "an XML document" } }
48 { $description "prints the contents of an XML document to " { $link output-stream } " in a prettyprinted form." }
49 { $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
50
51 HELP: pprint-xml-but
52 { $values { "xml" "an XML document" } { "sensitive-tags" "a sequence of names" } }
53 { $description "Prettyprints an XML document, leaving the whitespace of the tags with names in sensitive-tags intact." }
54 { $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
55
56 HELP: pprint-xml>string-but
57 { $values { "xml" "an XML document" } { "sensitive-tags" "a sequence of names" } { "string" string } }
58 { $description "Prettyprints an XML document, returning the result as a string and leaving the whitespace of the tags with names in sensitive-tags intact." }
59 { $notes "does not preserve what type of quotes were used or what data was omitted from version declaration" } ;
60
61 { xml>string print-xml write-xml pprint-xml pprint-xml>string pprint-xml>string-but pprint-xml-but } related-words
62