myTest532 myTest532
myTest532 myTest532

Reputation: 2391

Can <cfxml> be created in cfscript?

Is there a way to use in cfscript? I can't find a simple example online. I have a .cfc file built using cfscript and I'm trying to use cfxml.

I have a XMLContent variable and I tried the code below.

cfxml variable="myXML" {
    WriteOutPut(#XMLContent#);
}

It is returning: function keyword is missing in FUNCTION declaration. in my cfxml declaration.

Upvotes: 1

Views: 221

Answers (1)

James A Mohler
James A Mohler

Reputation: 11120

You could do this.

cfxml (variable="myXML") {
    WriteOutPut(XMLContent);
}

But I suspect you are trying to

  <cfscript>
  myXML = XMLParse(XMLContent);
  </cfscript>

Upvotes: 5

Related Questions