7 Replies Latest reply on Feb 17, 2009 5:51 AM by (Kamal_Sharif)

    LrXml encodes < but not >

    (Eugene_Berman)
      I've noticed that when LrXml serializes string that contains < and > symbols, the < is properly encoded as < - however, the > stays as is. I'm wondering if this is a bug, and if yes - how do I report it to Adobe?
        • 1. Re: LrXml encodes < but not >
          escouten Adobe Employee
          I've forwarded this message along to the engineer responsible for the XML portion of the SDK.
          • 2. Re: LrXml encodes < but not >
            arahn Level 1
            The escaping was done per the XML spec

            http://www.w3.org/TR/REC-xml/#syntax

            Which says "The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,...". The > character is not mentioned, so it doesn't have to be escaped.

            (Actually, it should be escaped inside a Cdata BLOCK when in the sequence if you don't intend to terminate the block. However, I don't think that situation is relavent here (?).)

            Why is the > character causing you problems?

            - Andy
            • 3. Re: LrXml encodes < but not >
              (Eugene_Berman) Level 1
              Hi Andy,

              Thanks for quick response! Apparently unescaped > causes problems on the server side. I'm sending XML-RPC request with one of the params being well-formed XML so it has to be properly escaped. E.g.:

                 
                   someParam
                  
                    <someTag>TEXT</someTag>
                  

                 


              For some reason, if the param looks like:

                    <someTag>TEXT</someTag>

              i.e. > is unescaped, the XML parser on the server side fails.
              • 4. Re: LrXml encodes < but not >
                (Kamal_Sharif)
                Hi guys;
                I just noted something similar to this. I am reading an xml tag that contains & and it is properly encoded to & but when I am reading and displaying it on a static_text, it shows the & which is very wrong. Have any idea?
                Thanks
                • 5. Re: LrXml encodes < but not >
                  arahn Level 1
                  Kamal,

                  I'm sorry, I don't understand your question. Can you provide more details and/or an example?

                  - Andy
                  • 6. Re: LrXml encodes < but not >
                    (Kamal_Sharif) Level 1
                    Sorry Andy for the confusion.<br />Imagine you have an xml file with this tag:<br /><br /><ApplicationPath> B&W Lab Photography </ApplicationPath><br /><br />The & gets encoded as &amp; in the xml file, so the above sting looks like this when you open it in text editor:<br /><ApplicationPath> B&amp;W Lab Photography </ApplicationPath><br />However, when you read the xml in the plugin, you get &amp; instead of the decoded string &<br /><br />Hope this clarifies
                    • 7. Re: LrXml encodes < but not >
                      (Kamal_Sharif) Level 1
                      Andy;<br />It seems that my xml exaple is in a mess because obviously this page encodes xml too. Here is the above message manuall endoded:<br />-----------------------------------------------------------<br />Sorry Andy for the confusion. <br />Imagine you have an xml file with this tag: <br /><br /><ApplicationPath> B&W Lab Photography </ApplicationPath> <br /><br />The & gets encoded as &amp;amp; in the xml file, so the above sting looks like this when you open it in text editor: <br /><ApplicationPath> B&amp;ampW Lab Photography </ApplicationPath> <br />However, when you read the xml in the plugin, you get &amp;amp; instead of the decoded string &<br /><br />Hope this clarifies <br />-----------------------------------------------------------