Accessing Node by XPath in .Net Options
Kapoue
Posted: Friday, May 30, 2008 10:46:24 AM
Rank: Newbie

Joined: 4/28/2008
Posts: 7
Location: Belgium - Brussels
Hello,

I tring to access to my nodes by XPath. For the moment I get my node with this code:
umbraco.presentation.nodeFactory.Node folder = new umbraco.presentation.nodeFactory.Node(1214);

But if the node is deleted and recreated my usercontrol does not work!

XPathNodeIterator it = umbraco.library.GetXmlNodeByXPath("/root/node/node[@nodeTypeAlias='FooterFeed Folder']");

But it seem that my XPath is incoorect or anythink else because if if I do it.InnerXml all the xml is retern and not only my selected node!

How can I do to select my node and access to the properties of this node?

Thanks in advance

Benjamin
Dirk
Posted: Friday, May 30, 2008 12:13:50 PM

Rank: Addict

Joined: 9/27/2007
Posts: 977
Location: Belgium
Hi Benjamin,

If you're not real xslt guru (me neither), try this tool

Real nice tool that can teach/mentor you in getting the right xpath expression.
And of course you need some data for your expression to operate on. Get the umbraco.config file from /data folder of your umbraco install, that file holds the complete xml representation of the content tree.

Good luck with it.

Oh btw, I see that you're from Belgium. Have you read this? Are you interested in joining?

Regards,
/Dirk



level 1 certified - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
Kapoue
Posted: Friday, May 30, 2008 12:41:40 PM
Rank: Newbie

Joined: 4/28/2008
Posts: 7
Location: Belgium - Brussels
I allready use this tool but it don't resolve my problem.

For belgium, yes I m interested an I work in a society the want to work with umbraco....
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.