World: r3wp
[XML] xml related conversations
older | first |
Oldes 13-Nov-2010 [895] | I'm not sure if the naming is correct, but I don't care, I need the functionality. |
GrahamC 13-Nov-2010 [896] | Does it handle name spaces? |
Oldes 14-Nov-2010 [897x5] | do you mean this?: >> print xmltree-to-str third parse-xml {<h:table xmlns:h="http://www.w3.org/TR/html4/"> { <h:tr> { <h:td>Apples</h:td> { <h:td>Bananas</h:td> { </h:tr> { </h:table>} <h:table xmlns:h="http://www.w3.org/TR/html4/"> <h:tr> <h:td>Apples</h:td> <h:td>Bananas</h:td> </h:tr> </h:table> |
But REBOL's default parse-xml has limitations, so better use Gavin's http://www.rebol.org/view-script.r?script=xml-parse.rif you must parse some advanced XML doc's. | |
Also it's probably possible to use parse instead of the recursive function call, but it's working for me so I will stay with this one. | |
Just note, that if the source xml is using CDATA, the parsed tree does not contain this info, so the result would be different. >> print xmltree-to-str probe third parse-xml+ {<foo>abc <![CDATA[Jack & Jill]]> xyz</foo> } [["foo" none ["abc Jack & Jill xyz"]]] <foo>abc Jack & Jill xyz</foo> | |
I'm not sure how to awoid this, but fortunately my XML sources must be well formed without CDATA so I'm safe. | |
Chris 23-Nov-2010 [902] | Graham, AltXML dom objects have a 'flatten function that renders xml. It preserves namespaces but not whitespace or cdata as cdata (though I may do a strict version that does both). |
BrianH 11-Mar-2011 [903] | Finally, the work of the W3C binary XML group is an official recommendation: http://www.w3.org/TR/exi/ |
onetom 30-Apr-2011 [904x2] | just an interesing fact: the Relax NG Compact schema description language is a Rebol dialect if i remove the commas from it. |
i tried it on the OAGiS Components.xsd which i transformed to RNG and the to RNC using XMLKit | |
Maxim 2-May-2011 [906:last] | anyone here had issues with receiving Form feed characters in XML (which are illegal in XML 1.0) ? |
older | first |