Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
[lb]Sonix #1
XML / XSLT / CF
Hi Everyone,
I'm trying to parse my XML File with ColdFusion and I've already made an
Object like:
<cffile action="read" file="C:\myxmldoc.xml" variable="XMLFileText">
<cfset myXMLDocument=XmlParse(XMLFileText)>
<cfoutput>#toString(myXMLDocument)#</cfoutput>
my Problem is: I only want to output some childs not the whole XML-File.
I could tranform it with XSLT, but my <xsl:template>...</xslt:template> as xls
String doesn't work.
Thx 4 help,
Sonix
[lb]Sonix Guest
-
XSLT and XML editing with DW8
Hello, I have to edit an server side xslt fragment and I would like to use Dreamweaver to do so. The problem is that the XSLT and XML is... -
XSLT url variable
I have the following XML page generated by ColdFusion <article id=1> <author>Joe Mac</author> <title>Syndicate goes on strike</title> <body>... -
rebuild php-4.2.2-17.2 with "--with-xml --enable-xslt --with xslt-sablot" on RedHat 9.0
Hi, I have RedHat 9.0 and installed by default Apache+PHP. By default XSLT Sablotron support is not enabled, so how can I rebuild PHP with xslt... -
XML::XSLT Module without LWP
I'm trying to use the XML::XSLT to do a transformation on an XML using XSLT file, both of which are on my server. XML::XSLT uses LWP as far as I... -
XML::XSLT
Hello everybody, Could anyone help me .... I am using module XML::XSLT to transform a file .xml with a stylesheet .xls. I think that is... -
RoBsTaMaCk #2
Re: XML / XSLT / CF
I'm going to use the latest virus alerts feed from .link.XmlText# (where x is
the item number you want)
From here, you can create a simple loop that changes the value of X and
outputs all the items. Even if you're only retrieving one node of data (and
not a series), hopefully the steps described above should help you determine
how to locate and reference the nodes you need.
<!--- // Retrieve XML file for latest virus alerts // --->
<cfhttp url="http://www.sophos.com/virusinfo/infofeed/tenalerts.xml"
method="GET"
timeout="15">
</cfhttp>
<!--- // Trim whitespace and parse XML // --->
<cfscript>
XMLContent = trim(cfhttp.filecontent);
XMLContent = XMLParse(XMLContent);
</cfscript>
<!--- // Output ONLY THE FIRST 5 alerts // --->
<cfoutput>
<cfloop from ="1" to="5" index="i">
<a href="#XMLContent.RDF.item[i].link.XmlText#"
target="_blank">#XMLContent.RDF.item[i].title.XmlText#</a><br>
</cfloop>
</cfoutput>
RoBsTaMaCk Guest



Reply With Quote

