]> gitweb.factorcode.org Git - factor.git/blob - basis/xml/writer/writer-docs.factor
Fixing everything I broke?
[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 xml.data ;
4 IN: xml.writer
5
6 ABOUT: "xml.writer"
7
8 ARTICLE: "xml.writer" "Writing XML"
9     "These words are used to print XML preserving whitespace in text nodes"
10     { $subsection write-xml }
11     { $subsection xml>string }
12     "These words are used to prettyprint XML"
13     { $subsection pprint-xml>string }
14     { $subsection pprint-xml }
15     "Certain variables can be changed to mainpulate prettyprinting"
16     { $subsection sensitive-tags }
17     { $subsection indenter }
18     "All of these words operate on arbitrary pieces of XML: they can take, as in put, XML documents, comments, tags, strings (text nodes), XML chunks, etc." ;
19
20 HELP: xml>string
21 { $values { "xml" "an XML document" } { "string" "a string" } }
22 { $description "This converts an XML document " { $link xml } " into a string. It can also be used to convert any piece of XML to a string, eg an " { $link xml-chunk } " or " { $link comment } "." }
23 { $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
24
25 HELP: pprint-xml>string
26 { $values { "xml" "an XML document" } { "string" "a string" } }
27 { $description "converts an XML document into a string in a prettyprinted form." }
28 { $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
29
30 HELP: write-xml
31 { $values { "xml" "an XML document" } }
32 { $description "prints the contents of an XML document to " { $link output-stream } "." }
33 { $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. The whitespace in the text nodes of the original document is preserved." } ;
34
35 HELP: pprint-xml
36 { $values { "xml" "an XML document" } }
37 { $description "prints the contents of an XML document to " { $link output-stream } " in a prettyprinted form." }
38 { $notes "This does not preserve what type of quotes were used or what data was omitted from version declaration, as that information isn't present in the XML data representation. Whitespace is also not preserved." } ;
39
40 { xml>string write-xml pprint-xml pprint-xml>string } related-words
41