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
Hello everyone,
very basic question but have no idea.
How are you guys able to debug the xml.
I've read people saying that when they view the generated xml they see the following nodes.
how are you doing this?
i've been working on a site over weekend.
here's some xslt:
<xsl:variable name="imageRoot" select="$currentPage/gallery"/> <xsl:variable name="mediaItems" select="umbraco.library:GetMedia($imageRoot, true())"/>
i want to know what nodes are returned by $mediaItems i.e. folder node, Image node, image props..
but I want to see this visually.
<xsl:copy-of select="$mediaItems "/> just return something like /media/80/xyz.jpg8181819
rememebr i am a newbie, so any help much appriciated.
>sajid
Hi Sajid,
Actually, if you view-source on that, you will see the XML - but if you put that in a textarea instead, you can see the data - try this:
<xsl:if test="umbraco.library:RequestQueryString('showxml') = 'yes'"> <textarea rows="8" cols="40"><xsl:copy-of select="$mediaItems" /></textarea> </xsl:if>
That way, you can always see the XML just by adding ?showxml=yes to the URL...
/Chriztian
PS: You can also try installing my XMLDump package - just search for it in the Projects section :-)
Chriztian thanx alot buddy...been doing <xsl:copy of but never saw the xml so the key is to use textarea
you rock!!!
heres what i get:
<Folder id="1061" version="9e18653b-3a9b-4b70-a770-b0670c51411d" parentID="-1" level="1" writerID="0" nodeType="1031" template="0" sortOrder="40" createDate="2010-07-16T19:57:03" updateDate="2010-07-16T19:57:04" nodeName="test32" urlName="test32" writerName="Administrator" nodeTypeAlias="Folder" path="-1,1061"> <contents /> <Image id="1062" version="1712d535-fcc5-4293-abbc-0be71ac44b99" parentID="1061" level="2" writerID="0" nodeType="1032" template="0" sortOrder="1" createDate="2010-07-16T19:57:25" updateDate="2010-07-16T19:57:26" nodeName="testimage1" urlName="testimage1" writerName="Administrator" nodeTypeAlias="Image" path="-1,1061,1062"> <umbracoFile>/media/63/img_1213.jpg</umbracoFile> <umbracoWidth>360</umbracoWidth> <umbracoHeight>480</umbracoHeight> <umbracoBytes>38718</umbracoBytes> <umbracoExtension>jpg</umbracoExtension> </Image> <Image id="1063" version="fa1b6297-2410-4073-9cf0-4fdd2ba222eb" parentID="1061" level="2" writerID="0" nodeType="1032" template="0" sortOrder="2" createDate="2010-07-16T21:49:31" updateDate="2010-07-16T21:49:31" nodeName="testimage2" urlName="testimage2" writerName="Administrator" nodeTypeAlias="Image" path="-1,1061,1063"> <umbracoFile>/media/79/img_1215.jpg</umbracoFile> <umbracoWidth>360</umbracoWidth> <umbracoHeight>480</umbracoHeight> <umbracoBytes>34163</umbracoBytes> <umbracoExtension>jpg</umbracoExtension> </Image> <Image id="1072" version="c076e758-f1b2-4a48-a1c1-3ad353c3d42c" parentID="1061" level="2" writerID="0" nodeType="1032" template="0" sortOrder="3" createDate="2010-07-17T14:54:39" updateDate="2010-07-17T14:54:39" nodeName="testImage3" urlName="testimage3" writerName="Administrator" nodeTypeAlias="Image" path="-1,1061,1072"> <umbracoFile>/media/147/067.jpg</umbracoFile> <umbracoWidth>640</umbracoWidth> <umbracoHeight>480</umbracoHeight> <umbracoBytes>127604</umbracoBytes> <umbracoExtension>jpg</umbracoExtension> </Image> <Image id="1075" version="e8ca6196-865d-4795-824c-32304123ef34" parentID="1061" level="2" writerID="0" nodeType="1032" template="0" sortOrder="4" createDate="2010-07-17T23:03:27" updateDate="2010-07-17T23:03:28" nodeName="testimage4" urlName="testimage4" writerName="Administrator" nodeTypeAlias="Image" path="-1,1061,1075"> <umbracoFile>/media/164/006.jpg</umbracoFile> <umbracoWidth>640</umbracoWidth> <umbracoHeight>480</umbracoHeight> <umbracoBytes>132044</umbracoBytes> <umbracoExtension>jpg</umbracoExtension> </Image></Folder>
Hey Sajid,
There is a checkbox with "encode/decode result" on the right. Click it and you wil see the source of the result. (and thus the xml)
Picturehttp://www.frederikvig.com/wp-content/uploads/umbraco-xslt/visualize-xslt-dialog.png
Hi Neils,
How do I get this dialogue box up, and does it give me the xslt result i.e. the HTML or the xml. As what I want to see is the structure of the nodes.
the reason why i want to see the node structure is so that i can get more familiar with the new schema. so any other tips would be most appreciated.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
viewing xml generated ver 4.5
Hello everyone,
very basic question but have no idea.
How are you guys able to debug the xml.
I've read people saying that when they view the generated xml they see the following nodes.
how are you doing this?
i've been working on a site over weekend.
here's some xslt:
<xsl:variable name="imageRoot" select="$currentPage/gallery"/>
<xsl:variable name="mediaItems" select="umbraco.library:GetMedia($imageRoot, true())"/>
i want to know what nodes are returned by $mediaItems i.e. folder node, Image node, image props..
but I want to see this visually.
<xsl:copy-of select="$mediaItems "/> just return something like /media/80/xyz.jpg8181819
rememebr i am a newbie, so any help much appriciated.
>sajid
Hi Sajid,
Actually, if you view-source on that, you will see the XML - but if you put that in a textarea instead, you can see the data - try this:
That way, you can always see the XML just by adding ?showxml=yes to the URL...
/Chriztian
PS: You can also try installing my XMLDump package - just search for it in the Projects section :-)
Chriztian thanx alot buddy...been doing <xsl:copy of but never saw the xml so the key is to use textarea
you rock!!!
heres what i get:
<Folder id="1061" version="9e18653b-3a9b-4b70-a770-b0670c51411d" parentID="-1" level="1" writerID="0" nodeType="1031" template="0" sortOrder="40" createDate="2010-07-16T19:57:03" updateDate="2010-07-16T19:57:04" nodeName="test32" urlName="test32" writerName="Administrator" nodeTypeAlias="Folder" path="-1,1061">
<contents />
<Image id="1062" version="1712d535-fcc5-4293-abbc-0be71ac44b99" parentID="1061" level="2" writerID="0" nodeType="1032" template="0" sortOrder="1" createDate="2010-07-16T19:57:25" updateDate="2010-07-16T19:57:26" nodeName="testimage1" urlName="testimage1" writerName="Administrator" nodeTypeAlias="Image" path="-1,1061,1062">
<umbracoFile>/media/63/img_1213.jpg</umbracoFile>
<umbracoWidth>360</umbracoWidth>
<umbracoHeight>480</umbracoHeight>
<umbracoBytes>38718</umbracoBytes>
<umbracoExtension>jpg</umbracoExtension>
</Image>
<Image id="1063" version="fa1b6297-2410-4073-9cf0-4fdd2ba222eb" parentID="1061" level="2" writerID="0" nodeType="1032" template="0" sortOrder="2" createDate="2010-07-16T21:49:31" updateDate="2010-07-16T21:49:31" nodeName="testimage2" urlName="testimage2" writerName="Administrator" nodeTypeAlias="Image" path="-1,1061,1063">
<umbracoFile>/media/79/img_1215.jpg</umbracoFile>
<umbracoWidth>360</umbracoWidth>
<umbracoHeight>480</umbracoHeight>
<umbracoBytes>34163</umbracoBytes>
<umbracoExtension>jpg</umbracoExtension>
</Image>
<Image id="1072" version="c076e758-f1b2-4a48-a1c1-3ad353c3d42c" parentID="1061" level="2" writerID="0" nodeType="1032" template="0" sortOrder="3" createDate="2010-07-17T14:54:39" updateDate="2010-07-17T14:54:39" nodeName="testImage3" urlName="testimage3" writerName="Administrator" nodeTypeAlias="Image" path="-1,1061,1072">
<umbracoFile>/media/147/067.jpg</umbracoFile>
<umbracoWidth>640</umbracoWidth>
<umbracoHeight>480</umbracoHeight>
<umbracoBytes>127604</umbracoBytes>
<umbracoExtension>jpg</umbracoExtension>
</Image>
<Image id="1075" version="e8ca6196-865d-4795-824c-32304123ef34" parentID="1061" level="2" writerID="0" nodeType="1032" template="0" sortOrder="4" createDate="2010-07-17T23:03:27" updateDate="2010-07-17T23:03:28" nodeName="testimage4" urlName="testimage4" writerName="Administrator" nodeTypeAlias="Image" path="-1,1061,1075">
<umbracoFile>/media/164/006.jpg</umbracoFile>
<umbracoWidth>640</umbracoWidth>
<umbracoHeight>480</umbracoHeight>
<umbracoBytes>132044</umbracoBytes>
<umbracoExtension>jpg</umbracoExtension>
</Image>
</Folder>
>sajid
Hey Sajid,
There is a checkbox with "encode/decode result" on the right. Click it and you wil see the source of the result. (and thus the xml)
Picture
http://www.frederikvig.com/wp-content/uploads/umbraco-xslt/visualize-xslt-dialog.png
Hi Neils,
How do I get this dialogue box up, and does it give me the xslt result i.e. the HTML or the xml. As what I want to see is the structure of the nodes.
the reason why i want to see the node structure is so that i can get more familiar with the new schema. so any other tips would be most appreciated.
>sajid
is working on a reply...