4 Replies Latest reply on Feb 9, 2010 12:29 PM by ilssac

    Does Adobe hate xml tags that start with an underscore? <_TYPE_>

    wmkolcz Level 1

      I am trying to generate XMl document using a template and filling in values using CF. There are 4 nodes that start with an underscore (which i cannot change due to where the XML is being used)

       

          <_ASSET_>Media_C<_ASSET_>
          <_ITEMNAME_>#videoURL#<_ITEMNAME_>
          <_TYPE_>YouTube<_TYPE_>
          <_ITEMDESCRIPTION_><![CDATA[#title#]]><_ITEMDESCRIPTION_>
          <_GROUP_Media_Parent>Pressreleases<_GROUP_Media_Parent>

       

      First weird thing was when I tried to close the nodes in Dreamweaver, then save it and reopen it, DW removed them again and again...So I edited in NotePad, which kept them there...

       

      However when i ran the script in ColdFusion, it removed them again.

       

      Here is my code.

       

              <cfoutput query="videoData">
              <cfsavecontent variable="theXML"><?xml version="1.0" encoding="ISO-8859-1" ?>
      <document>
          <_ASSET_>Media_C</_ASSET_>
          <_ITEMNAME_>#videoURL#</_ITEMNAME_>
          <_TYPE_>YouTube</_TYPE_>
          <_ITEMDESCRIPTION_><![CDATA[#title#]]></_ITEMDESCRIPTION_>
          <_GROUP_Media_Parent>Pressreleases</_GROUP_Media_Parent>   
          <youtube_url>#videoURL#</youtube_url>
          <media_height>265</media_height>
          <media_width>320</media_width>
          <media_text_equivalent></media_text_equivalent>
          <media_title></media_title>
          <media_author></media_author>
          <media_date></media_date>
          <media_thumbnail></media_thumbnail>
          <media_duration></media_duration>
          <media_summary></media_summary>
          <video_keywords></video_keywords>
          <video_closed_captions></video_closed_captions>
          <video_audio_description></video_audio_description>
      </document>
                      </cfsavecontent>
                  <cffile action = "write" output="#theXML#" file = "E:\Inetpub\wwwroot\prmc\XMLPorter\completed\newsroom\video\#videoURL#.xml">
              </cfoutput>

       

      I assume it has something to do with the underscore...but what? All the rest of the nodes stay closed and DW/CF has no issue with them..

       

      Any ideas on how to get the end nodes closed off for good at generation?

        • 1. Re: Does Adobe hate xml tags that start with an underscore? <_TYPE_>
          ilssac Level 5

          It worked for me, once I modified the pasted code to include closing versions of the underscore tags.

           

          <cfsavecontent variable="theXML"><?xml version="1.0" encoding="ISO-8859-1" ?>
          <document>
          <_ASSET_>Media_C</_ASSET_>
          <_ITEMNAME_>videoURL</_ITEMNAME_>
          <_TYPE_>YouTube</_TYPE_>
          <_ITEMDESCRIPTION_><![CDATA[#title#]]></_ITEMDESCRIPTION_>
          <_GROUP_Media_Parent>Pressreleases</_GROUP_Media_Parent>   
          <youtube_url>videoURL</youtube_url>
          <media_height>265</media_height>
          <media_width>320</media_width>
          <media_text_equivalent></media_text_equivalent>
          <media_title></media_title>
          <media_author></media_author>
          <media_date></media_date>
          <media_thumbnail></media_thumbnail>
          <media_duration></media_duration>
          <media_summary></media_summary>
          <video_keywords></video_keywords>
          <video_closed_captions></video_closed_captions>
          <video_audio_description></video_audio_description>
          </document>
          </cfsavecontent>
          <cffile action = "write" output="#theXML#" file = "C:\Inetpub\wwwroot\videoURL.xml">
          
          
          • 2. Re: Does Adobe hate xml tags that start with an underscore? <_TYPE_>
            ilssac Level 5

            Ok, I think I see what you are talking about.

             

            Dreamweaver does not seeem to like something about cutting and pasting and saving a file with </_...> tags.  It does remove them at the point of saving the file.

             

            But once I added them back and saved the file all worked fine.

             

            So it does look like a bug with Dreamweaver.... you may want to report it.

            • 3. Re: Does Adobe hate xml tags that start with an underscore? <_TYPE_>
              wmkolcz Level 1

              I ran your code (changing the destination) and it came out like this:

               

              <?xml version="1.0" encoding="ISO-8859-1" ?>
              <document>
              <_ASSET_>Media_C<_ASSET_>
              <_ITEMNAME_>videoURL<_ITEMNAME_>
              <_TYPE_>YouTube<_TYPE_>
              <_ITEMDESCRIPTION_><![CDATA[Blacks not receiving chemotherapy for rectal cancer, despite seeing cancer specialists, U-M study finds]]><_ITEMDESCRIPTION_>
              <_GROUP_Media_Parent>Pressreleases<_GROUP_Media_Parent>  
              <youtube_url>videoURL</youtube_url>
              <media_height>265</media_height>
              <media_width>320</media_width>
              <media_text_equivalent></media_text_equivalent>
              <media_title></media_title>
              <media_author></media_author>
              <media_date></media_date>
              <media_thumbnail></media_thumbnail>
              <media_duration></media_duration>
              <media_summary></media_summary>
              <video_keywords></video_keywords>
              <video_closed_captions></video_closed_captions>
              <video_audio_description></video_audio_description>
              </document>

              • 4. Re: Does Adobe hate xml tags that start with an underscore? <_TYPE_>
                ilssac Level 5

                To expand on my second post, I noticed that Dreamweaver elminiated all the slashes in the underscore tags the first time I saved the file after I copied and pasted the xml.

                 

                But when I went in and typed the slashs back into the closing tags and saved the file a second time, it all worked correctly.

                 

                That is all the farther I tested it.