I am developing website using umbraco cms. I have xml file in project root folder. And I am reading xml file in my xslt file. Right now i am hardcoded the full file path like document("D://ProjectFoldername/test.xml).now its working good.
I need how to give file path as ('test.xml').but is showing error error in reading _.xslt file
relative path and server.mappath in xslt
I am developing website using umbraco cms. I have xml file in project root folder. And I am reading xml file in my xslt file. Right now i am hardcoded the full file path like document("D://ProjectFoldername/test.xml).now its working good.
I need how to give file path as ('test.xml').but is showing error error in reading _.xslt file
Please suggest be better solution
Hi selva,
You could use
<xsl:variable name="xmlFromUrl" select="umbraco.library:GetXmlDocumentByUrl('http://www.domain.com/test.xml')" />which returns an XPathNodeIterator
From there on, you can query your xml as you'd normally would in xslt.
Cheers,
/Dirk
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.