|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
CFscript & XML
HI all,
I am new to Cfscript and XML, I am trying to create an XML Doc with a XSLT attached, having trouble applying the XSLT within the following code: Code:
<cfscript>
MyDoc = XmlNew();
MyDoc.xmlRoot = XmlElemNew(MyDoc,"MyRoot");
for (i = 1; i LTE numEmploy; i = i + 1)
{
MyDoc.MyRoot.XmlChildren[i] = XmlElemNew(MyDoc,#cctemploy[i].xmlname#);
MyDoc.MyRoot.XmlChildren[i].XmlText = #cctemploy[i].XMLtext#;
}
</cfscript>
I am trying to insert Code:
<?xml:stylesheet herf=”My.xsl” type=”text/xsl”?> I keep getting syntax errors from the brackets and quotes Can some one please tell me how to do this? Thanks Fry |
|
#2
|
|||
|
|||
|
I'm not sure if you can embed the stylesheet declaration using the function. You may just need to use the replace() function or string concantination to put the declaration in the file.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > CFscript & XML |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|