Copied to clipboard

Flag this post as spam?

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


  • Mark Roffey 18 posts 32 karma points
    Feb 12, 2010 @ 23:44
    Mark Roffey
    0

    nodeFactory "level" attribute?

    I'm trying to get the "level" attribute from the node factory, but it doesn't seem to be available. Does anyone know how to get it at all?

    At the minute I'm looking at getting the path, splitting it it, and the subtracting the count -1. But that's a bit rubbish, although effective.

    Is there another solution that anyone else can recommend?

    Thanks in advance.

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Feb 13, 2010 @ 11:10
    Thomas Höhler
    2

    You are right, the level isn't present in the nodefactory. The solution you are using seems to be the best for me, cause all other options (fetching the level from the Document or via GetXmlNodeById or something) are to 'expensive'. If you are using .Net 3.5 you can write an ExtensionMethod, so you can use the function directly on the node instance.

    hth, Thomas

Please Sign in or register to post replies

Write your reply to:

Draft