Copied to clipboard

Flag this post as spam?

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


  • shanem 39 posts 93 karma points
    Jun 02, 2011 @ 12:36
    shanem
    0

    USiteBuilder and the umbraco.config format

    I don't know if I'm missing something obvious but I was wondering if USiteBuilder alters the XML cache file (umbraco.config) format?

    I'm using Umbraco 4.7.0.378 and USiteBuilder and I don't know if Umbraco changed the umbraco.config file or USiteBuilder does. Here is my method:

           private static XPathNodeIterator GetXmlNodeByXPath(string xpathQuery)
    {
    XPathNavigator xp = umbraco.library.GetXmlAll().Current;
    if (xp != null) return xp.Select(xpathQuery);
    return null;
    }

    So I'm getting the cached XML and it has the following format:

    <root id="-1">
    <Home id="1114" ...
    <title ...
    <introText ...
    <Blog id="1236" ...
    <pageTitle ...

    This doesn't have any node elements as described here: http://our.umbraco.org/wiki/reference/files-and-folders/umbracoconfig-format

    So I can't run an XPATH query like this on the XML: //node[@nodeTypeAlias = 'Home']

    Can you help?

  • Vladan Ostojic 94 posts 210 karma points
    Jun 02, 2011 @ 12:53
    Vladan Ostojic
    0

    Hi,

    uSiteBuilder never alters Umbraco cache file nor reads from it directly. Instead, uSiteBuilder uses Umbraco Node API for reading the content (at the end content is read from XML) and Document API for saving the content via ContentHelper.Save (at the end XML cache get's updated).

     

    Now about your issue - umbraco cache xml format has changed since version 4.5 I think (I don't remember exact version). Link to umbraco XML cache format that you provided shows old XML scheme (for Umbraco versions before version 4.5).

     

    Cheers

  • shanem 39 posts 93 karma points
    Jun 02, 2011 @ 12:55
    shanem
    0

    Thanks for the clarification.

Please Sign in or register to post replies

Write your reply to:

Draft