Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have some error in XPath selection, and I want to debug it. So I need to see XML.
How can I print XML to HTML directly without transformation and removing attributes?
Hi AlexR,
A very simple trick is to use this piece of code in your xslt which will get the xml of the current node in a textarea field:
<textarea><xsl-copy-of select="$currentPage" /></textarea>
Or, you could try to debug your xslt, as per instructions on my blog
Cheers,
/Dirk
Hi AlexR (and others interested),
I created a package that'll let you view the XML colourcoded and stripped down for easier debugging. Does a couple of other tricks too (like getting nodes by @nodeTypeAlias or @id and getting a media item's XML from the @id).
It's located here: http://our.umbraco.org/projects/xml-dump
Let me know if you like it or hate it :-)
/Chriztian
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.
Continue discussion
How to print XML tree to html without transformation and removing attributes for debuging ?
I have some error in XPath selection, and I want to debug it. So I need to see XML.
How can I print XML to HTML directly without transformation and removing attributes?
Hi AlexR,
A very simple trick is to use this piece of code in your xslt which will get the xml of the current node in a textarea field:
Or, you could try to debug your xslt, as per instructions on my blog
Cheers,
/Dirk
Hi AlexR (and others interested),
I created a package that'll let you view the XML colourcoded and stripped down for easier debugging. Does a couple of other tricks too (like getting nodes by @nodeTypeAlias or @id and getting a media item's XML from the @id).
It's located here: http://our.umbraco.org/projects/xml-dump
Let me know if you like it or hate it :-)
/Chriztian
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.