Copied to clipboard

Flag this post as spam?

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


  • skiltz 501 posts 701 karma points
    Feb 11, 2010 @ 00:13
    skiltz
    0

    Get all Doucments of DocumentType X

    In a .net control how does one go about getting all documents of documenttype X?  Google has failed me.

     

     

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Feb 11, 2010 @ 02:14
    Nik Wahlberg
    0

    Hi skiltz, try something like this:

    XPathNodeIterator xmlpathAll = library.GetXmlAll();
    XmlDocument docAll = new XmlDocument();
    doc.LoadXml(xmlpathAll.Current.OuterXml);
    
    XmlNodeList list = doc.GetElementsByTagName("node");
    // loop over the nodes returned
    foreach (XmlNode node in list)
    {
        if (node.Attributes["nodeTypeAlias"].Value == "YOU_NODE_TYPE")
        {
            // do your shizzle...
        }
    }

    Hope this helps,
    Nik

  • skiltz 501 posts 701 karma points
    Feb 11, 2010 @ 02:32
    skiltz
    0

    Thanks Nik worked perfectly :)

  • 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.

Please Sign in or register to post replies