Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: CDATA tag missing even if specified [Thread Next] Re: CDATA tag missing even if specifiedTo: NULL Date: 5/13/2009 3:59:00 PM Found the problem, i had an XSL transform to indent the
output that referenced the wrong element in "cdata-section-elements"
Thanks
"Martin Honnen" <mahotrash@y...> a écrit dans le message de news:
udB$xy80JHA.4116@T......
> rodv wrote:
>> Hello group, i have to pieces of VB6 code, that add a CDATA section to an
>> element
>>
>> Here are the excerpt of the relevant code
>>
>> Dim goXMLOutPutRegUninstallDoc As New MSXML2.DOMDocument
>> Dim OutputString As String
>> Dim OutputBody As IXMLDOMCDATASection
>>
>> Set goXMLOutPutRegUninstallOutput =
>> goXMLOutPutRegUninstallDoc.createElement("RegUninstalloutput")
>>
>> Set OutputBody =
>> goXMLOutPutRegUninstallDoc.createCDATASection("___TEST")
>> goXMLOutPutRegUninstallOutput.appendChild OutputBody
>>
>>
>> The problem is the CDATA tag is not added ! i really dont know why ?
>> maybe someone could shed some light on this.
>
> Consider to post a minimal but complete sample that allows us to reproduce
> the problem. At least explain how you check that the CDATA section has
> been added.
> I have no problems with the following code:
>
> Set doc = CreateObject("Msxml2.DOMDocument.3.0")
> Set el = doc.createElement("foo")
> el.appendChild doc.createCDATASection("a < b && b < c")
> WScript.Echo el.xml
>
> It outputs
>
> <foo><![CDATA[a < b && b < c]]></foo>
>
>
> --
>
> Martin Honnen --- MVP XML
> http://msmvps.com/blogs/martin_honnen/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
