preserve vertical white space in XML?
Mark Smith
mark at maseurope.net
Sat Jul 9 06:46:43 EDT 2005
I noticed this too - the revXMLText function does not put any end of
line delimiters between tags, though of course it preserves them with
in node contents.
For simple cases (and I think this would cover the case given),
put revXMLText(treeID) into theXML
replace "><" with ">" & cr & "<" in theXML
will work.
On my current project, I found it easier (and quicker in execution) to
generate the XML in my own code, rather than using the library, though
I still use the library for reading it back in.
Mark Smith
On 9 Jul 2005, at 06:50, Sivakatirswami wrote:
> I always use extra line breaks in my XML docs and .XHTML docs... for
> readability.
>
> But, if you create an XML Tree from one of these, transform some data
> in a node and then
>
> put revXMLText(tCurrTree) into tNewFile
>
> to get that data back out, Rev's XML libraries have wiped out all the
> cr's.
>
> What is interesting is that double cr's are preserved, singles are not
>
> e.g
>
> <node1>Revolutionaries</node1>
> <node2>will make a better future</node2>
> <here_is_why>
>
> A brilliant rev advocacy essay
>
> with many paragraphs
>
> </here_is_why>
>
> get returned as:
>
> <node1>Revolutionaries</node1><node2>will make a better
> future</node2><here_is_why>
>
> A brilliant rev advocacy essay
>
> with many paragraphs
>
> </here_is_why>
>
> Is there a way to preserve the single cr's in the original? Otherwise
> I have to a) live with it b) open them in BBEdit and run a format
> function to get them back to a readable state--each child node on it's
> own line...
>
> TIA
>
> Sivakatirswami
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list