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
Hi,
I am trying to find the nodeID for a document so I can create a child document under it.
The XSLT I am using is as follows (where 'McIntyre' is the name of the parent page)
"node[@nodeName='McIntyre' and @nodeTypeAlias='Family']"
I am then calling the XSLT with the following code
System.Xml.XPath.XPathNodeIterator iter = umbraco.library.GetXmlNodeByXPath(itemName);
I am having trouble debugging the solution and no matter what I do with the iterator can't seem to get to the NodeID.
I am definately not an XSLT guru and would appreciate any help.
Thanks
Aaron
Try
System.Xml.XPath.XPathNodeIterator iter = umbraco.library.GetXmlNodeByXPath("//node[@nodeName='McIntyre' and @nodeTypeAlias='Family']" );
Thanks Chris.
Adding the // to the front of the XSLT solved the problem. I had been using an online tester which had been working without the // which is what threw me.
Cheers
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting NodeID from DocType and DocName using XSLT and API
Hi,
I am trying to find the nodeID for a document so I can create a child document under it.
The XSLT I am using is as follows (where 'McIntyre' is the name of the parent page)
I am then calling the XSLT with the following code
I am having trouble debugging the solution and no matter what I do with the iterator can't seem to get to the NodeID.
I am definately not an XSLT guru and would appreciate any help.
Thanks
Aaron
Try
Thanks Chris.
Adding the // to the front of the XSLT solved the problem. I had been using an online tester which had been working without the // which is what threw me.
Cheers
is working on a reply...