Yes, and it probably is.  You can run the MXML file through an XML validator to 
check.

But then the data in the CDATA gets handed to the compiler, and I don't 
remember our rules for string-based properties.  Either you have to escape them 
to also be Java-compiler-compatible, or the MXML parser in the compiler is 
supposed to escape incoming strings.

If you can run a test using Flex it might answer that question.

I think you have to escape strings and use backslash-n for linefeeds, for 
example.  There might be some online Java string escape converters if the rule 
is that you have to escape it yourself.

HTH,
-Alex

On 5/13/22, 2:07 AM, "Piotr Zarzycki" <piotrzarzyck...@gmail.com> wrote:

    Shouldn't CDATA be ignored by compiler ? At least what is inside of it ?

    czw., 12 maj 2022 o 17:37 Piotr Zarzycki <piotrzarzyck...@gmail.com>
    napisał(a):

    > Hi guys,
    >
    > I'm fighting with problem of displaying text inside component in MXML. I
    > have following text and a lot of similar one:
    >
    > "for machine in $(pfexec VBoxManage list runningvms | cut -f 1 -d ' ' |
    > sed 's/&quot;//g'); do pfexec VBoxManage showvminfo $machine | grep
    > &quot;Memory size:&quot; | sed 's/^.* \([0-9]*\)MB$/\1/g' ; done | awk
    > '{sum+=$1/1024.0}END{printf &quot;Running:  %d GB\n&quot;, sum}'; for
    > machine in $({ pfexec VBoxManage list vms | grep -v Template; pfexec
    > VBoxManage list runningvms; } | sort | uniq -u | cut -f 1 -d ' ' | sed
    > 's/&quot;//g'); do pfexec VBoxManage showvminfo $machine | grep
    > &quot;Memory size:&quot; | sed 's/^.* \([0-9]*\)MB$/\1/g' ; done | awk
    > '{sum+=$1/1024.0}END{printf &quot;Other:  %d GB\n&quot;, sum}';"
    >
    > I need to literally display it without changes. I would like to do that
    > inside MXML, no var declaration etc. I was experimenting with CDATA, but
    > compiler still complains about some literals inside this text instead
    > ignoring it.
    >
    > Does anyone have an experience with this ?
    >
    > Thanks,
    > --
    >
    > Piotr Zarzycki
    >


    -- 

    Piotr Zarzycki

Reply via email to