You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Daniel Baktiar (JIRA)" <ji...@apache.org> on 2011/05/30 09:17:47 UTC

[jira] [Created] (CONFIGURATION-450) CDATA is not handled properly for XMLConfiguration

CDATA is not handled properly for XMLConfiguration
--------------------------------------------------

                 Key: CONFIGURATION-450
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-450
             Project: Commons Configuration
          Issue Type: Bug
          Components: Build
    Affects Versions: 1.6
            Reporter: Daniel Baktiar


The XMLConfiguration does not handle XML CDATA escape properly. For example:

<?xml version="1.0" encoding="UTF-8" ?>
<abc>
  <def>
    <ghi><![CDATA[~!@#$%^&]]></ghi>
  </def>
</abc>

will give error message:
The element type "ghi" must be terminated by the matching end-tag "</ghi>".

I expect that normal escaping should occur with the standard XML CDATA escape.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CONFIGURATION-450) CDATA is not handled properly for XMLConfiguration

Posted by "Daniel Baktiar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041455#comment-13041455 ] 

Daniel Baktiar commented on CONFIGURATION-450:
----------------------------------------------

Hi Oliver,

I will try to investigate and check the whether the XML passed is valid.

I will check as well which parser is in use when the error happens.

Just want to check with you? Do we use the Apache commons-digester for the parsing?

Thanks.


> CDATA is not handled properly for XMLConfiguration
> --------------------------------------------------
>
>                 Key: CONFIGURATION-450
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-450
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.6
>            Reporter: Daniel Baktiar
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> The XMLConfiguration does not handle XML CDATA escape properly. For example:
> <?xml version="1.0" encoding="UTF-8" ?>
> <abc>
>   <def>
>     <ghi><![CDATA[~!@#$%^&]]></ghi>
>   </def>
> </abc>
> will give error message:
> The element type "ghi" must be terminated by the matching end-tag "</ghi>".
> I expect that normal escaping should occur with the standard XML CDATA escape.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CONFIGURATION-450) CDATA is not handled properly for XMLConfiguration

Posted by "Daniel Baktiar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Baktiar resolved CONFIGURATION-450.
------------------------------------------

    Resolution: Invalid

I just discovered how foolish and ignorant I am. It's just a typo, missing character in the closing tag.
Sorry for the inconvenience.

> CDATA is not handled properly for XMLConfiguration
> --------------------------------------------------
>
>                 Key: CONFIGURATION-450
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-450
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.6
>            Reporter: Daniel Baktiar
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> The XMLConfiguration does not handle XML CDATA escape properly. For example:
> <?xml version="1.0" encoding="UTF-8" ?>
> <abc>
>   <def>
>     <ghi><![CDATA[~!@#$%^&]]></ghi>
>   </def>
> </abc>
> will give error message:
> The element type "ghi" must be terminated by the matching end-tag "</ghi>".
> I expect that normal escaping should occur with the standard XML CDATA escape.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CONFIGURATION-450) CDATA is not handled properly for XMLConfiguration

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041438#comment-13041438 ] 

Oliver Heger commented on CONFIGURATION-450:
--------------------------------------------

This is strange.

XMLConfiguration does not do any XML parsing on its own, but delegates to the XML parser (probably the one shipped with the JDK if you do not have other libraries installed). So the error you receive comes from this parser. Can you check with other tools whether your XML is actually valid (e.g. with a browser)?

In the unit tests of XMLConfiguration a test XML document is loaded which contains some CDATA sections. So CDATA can be handled in principle.

> CDATA is not handled properly for XMLConfiguration
> --------------------------------------------------
>
>                 Key: CONFIGURATION-450
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-450
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.6
>            Reporter: Daniel Baktiar
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> The XMLConfiguration does not handle XML CDATA escape properly. For example:
> <?xml version="1.0" encoding="UTF-8" ?>
> <abc>
>   <def>
>     <ghi><![CDATA[~!@#$%^&]]></ghi>
>   </def>
> </abc>
> will give error message:
> The element type "ghi" must be terminated by the matching end-tag "</ghi>".
> I expect that normal escaping should occur with the standard XML CDATA escape.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (CONFIGURATION-450) CDATA is not handled properly for XMLConfiguration

Posted by "Daniel Baktiar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Baktiar closed CONFIGURATION-450.
----------------------------------------


This issue is invalid.

> CDATA is not handled properly for XMLConfiguration
> --------------------------------------------------
>
>                 Key: CONFIGURATION-450
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-450
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.6
>            Reporter: Daniel Baktiar
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> The XMLConfiguration does not handle XML CDATA escape properly. For example:
> <?xml version="1.0" encoding="UTF-8" ?>
> <abc>
>   <def>
>     <ghi><![CDATA[~!@#$%^&]]></ghi>
>   </def>
> </abc>
> will give error message:
> The element type "ghi" must be terminated by the matching end-tag "</ghi>".
> I expect that normal escaping should occur with the standard XML CDATA escape.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira