[q-lang-cvs] q/modules/xml/examples xml_examp.q,1.3,1.4
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2006-04-25 18:15:54
|
Update of /cvsroot/q-lang/q/modules/xml/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11271 Modified Files: xml_examp.q Log Message: updated examples Index: xml_examp.q =================================================================== RCS file: /cvsroot/q-lang/q/modules/xml/examples/xml_examp.q,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xml_examp.q 10 Sep 2004 19:08:30 -0000 1.3 --- xml_examp.q 25 Apr 2006 18:15:51 -0000 1.4 *************** *** 33,38 **** /* Translate a tree back to an XMLDoc. Example: def T = tidy DOC; doc T. */ - private add_node PARENT NODE; - doc (node INFO CHILDREN) = do (add_node (xml_root DOC)) CHILDREN || DOC --- 33,36 ---- *************** *** 89,98 **** */ - private indent SPACE NODES; - print X = indent "" X; - private attrs ATTRS, content CONTENT, dflt DEFAULT; - indent SPACE NODES:List = do (indent SPACE) NODES; --- 87,92 ---- *************** *** 225,230 **** indent (SPACE++" ") CHILDREN; - private attr1 ATTR; - attrs [] = ""; attrs ATTRS = sprintf " (%s)" (join "," (map attr1 ATTRS)); --- 219,222 ---- *************** *** 233,238 **** attr1 (KEY,VAL) = sprintf "%s=%s" (KEY,str VAL); - private wrap X, contents X; - /* This function creates a content declaration in legal XML syntax from an XMLElementContent value. */ --- 225,228 ---- |