The xml parser is creating nested elements of your DIV and P tags.

You need to specify that you want to keep the literal text within the
WHAT tags. To do that, use CDATA in your WHAT element:

<me>
<what>
<![CDATA[<div><p>hello</p></div>]]>
</what>
</me>

Or, if you are generating the source XML in CF, you can use the
xmlFormat() function:

<me>
<what>
<cfoutput>#xmlFormat("<div><p>hello</p></div>")#</cfoutput>
</what>
</me>

M!ke 

-----Original Message-----
From: DRE [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 13, 2005 11:28 AM
To: CF-Talk
Subject: raw XML text of a node??

Hi, This amazes me. It seems there is no function to get the raw xml
component of a node?

See this code

<cfsavecontent variable="me">
<me>
<what>
<div><p>hello</p></div>
</what>
</me>
</cfsavecontent>

<cfset me1 = xmlparse(me)>

<cfset nodes = xmlsearch(me1,"//what")>

<cfdump var="#nodes[1]#">

<cfoutput>#nodes[1].XMLText#</cfoutput>

You can see in the cfdump the html text I want to extract
(<div><p>hello</p></div>) but when I go to xmltext there is nothing
there.  It continues to treat it as xml and break it up into structures.

Anybody know if theres a trick or missed function or do I have to go to
java and see if that implementation is more sophistocated?

DRE

On 8/11/05, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> I wondered about that, too.  Thanks for clarifying.
> 
> -----Original Message-----
> From: Ian Skinner [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 11, 2005 2:18 PM
> To: CF-Talk
> Subject: RE: FORM scope into SESSION
> 
> IIRC I ran into that vary problem.  Session.form = form does indeed 
> just create a reference and I believe it caused me problems.  
> Session.form =
> duplicate(form) does create a deep copy and is the solution I came to 
> use, I believe.
> 
> Sorry for the imprecise details.  Hectic day, oracle database not talk

> to my website, causing all sorts of problems.
> 
> HTH
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214868
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to