Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDATA in SRGS (GRXML) 1

Status
Not open for further replies.

mater

Technical User
Apr 5, 2005
4
IT
Hello, i am a newbie
i have a problem.. i am building an editor with and i need to process this CDATA section

<tag><![CDATA[<provincia "AG">]]></tag>

How can i read value??

I can't change the <tag>sintax :(
Neither use the node.nodevalue or node.data

Thank a lot for ur help

Fabrizio
 
I'am using microsoft.xmldom with ASP.
and the xml file is a GRXML file

this (if could be usefull) is a possible xml prolog

<grammar
xml:lang="it-IT"
version="1.0"
mode="voice"
tag-format="Nuance"
root="myapp"
xmlns=" xmlns:xsi=" xsi:schemaLocation="
thanks for ur help
 
'Cause node.nodeValue can't read inside
<tag><![CDATA[<provincia "AG">]]></tag>

for ex:

node.nodevalue = "AG"
<tag><![CDATA[<provincia>"AG"</provincia>]]></tag>

for
<tag><![CDATA[<provincia "AG">]]></tag>
node.nodevalue = "" ..

Perhaps i am in error !..but i tried with many xmlfiles...
 
Don't use nodeValue on 'provincia' element as its not an element, its CDATA. Use nodeValue on the tag's text child. Perhaps this will help you:
Code:
<%
set xml = Server.CreateObject("Msxml2.FreeThreadedDOMDocument")
xml.async = false
xml.loadXML("<tag><![CDATA[<provincia>AG</provincia>]]></tag>")

str = xml.firstChild.firstChild.nodeValue
str = Replace (str, "<", "&lt;")

Response.Write(str)
%>
 
Thank u a lot...
It's very embarassing.. the problem was in Internet Explorer .. it doesn't shown the result.. :(

Tks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top