Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • selva 3 posts 23 karma points
    Jul 29, 2011 @ 04:53
    selva
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 29, 2011 @ 07:18
    Dirk De Grave
    0

    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

  • 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.

Please Sign in or register to post replies