Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-594

Adding CData to xml property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.0-alpha1
    • None
    • Type conversion
    • None

    Description

      Need to add CDATA into XML Property element, but special character are getting added. Here is my code. Please give your thoughts on the same.
      Here is the code.
      String cDataTagStart="
      <![CDATA[";
      String cDataTagEnd="]]
      >";
      credentialsURL =cDataTagStart+credentialsURL+cDataTagEnd;
      xmlContentOfMetaData = CredentialProvider.getInstance();
      xmlContentOfMetaData.addProperty("Resource(-1).ResourceName", resourceName);
      xmlContentOfMetaData.addProperty("Resource.ResourceURL", credentialsURL);

      But Special characters are getting added
      ResourceName>TESTRESOURCENAME</ResourceName>
      <ResourceURL>\<![CDATA[TESTCredentialsURLS2]]\></ResourceURL>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jeevitesh jeevitesh
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: