Copied to clipboard

Flag this post as spam?

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


  • Nam Gi VU 26 posts 47 karma points
    Feb 03, 2010 @ 10:08
    Nam Gi VU
    0

    How to print the xml tree of the Content?

    I thinks it's useful for me to explore the XSLT macro if I would have the xml-tree of the Content in the form of a text file.

    Can we have that in Umbraco?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Feb 03, 2010 @ 10:20
    Dirk De Grave
    0

    If you need the complete published xml, open up the /data/umbraco.config file and have a look at the structure. Also, you can use the xslt visualizer to test the xslt at design time (when editing an xslt file)

    Hope this helps.

    Regards,

    /Dirk

  • Petr Snobelt 923 posts 1535 karma points
    Feb 03, 2010 @ 12:26
    Petr Snobelt
    2

    Or you can use textarea trick

    <textarea>
    <xsl:copy-of select="$currentPage">
    </textarea>

    Of course you can change $currentPage to macro or whatever you want.

    Petr

  • Nam Gi VU 26 posts 47 karma points
    Apr 05, 2010 @ 11:00
    Nam Gi VU
    0

    @Petr Snobelt: In case I want to print the whole xml tree of the Content node of Umbraco, what should I put in place of $currentPage in your above suggestion?

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Apr 05, 2010 @ 11:22
    Sebastiaan Janssen
    2

    You could just open /data/umbraco.config if you want to see the XML :-)

    This will work though:

    <textarea>
      <xsl:copy-of select="$currentPage/ancestor::root" />
    </textarea>
  • Kim Andersen 1447 posts 2196 karma points MVP
    Apr 05, 2010 @ 11:23
    Kim Andersen
    0

    @Nam Gi VU:

    If you want to see your whole website, you can just use the solution that Petr provided on the homepage of your site (the root of your site /). Just put the textarea into a random xslt-file on your homepage to see that page, and all of the underlying nodes.

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft