public string GetPageAttribute(string pageId, string attr)
{
try
{
string hierarchy;
string sectionId;
_mApp.GetHierarchyParent(pageId, out sectionId);
_mApp.GetHierarchy(sectionId, HierarchyScope.hsPages, out hierarchy);
var doc = new XmlDocument();
doc.LoadXml(hierarchy);
string xpath = String.Format("//one:Page[@ID='{0}']", pageId);
XmlNode page = doc.SelectSingleNode(xpath, GetNSManager(doc.NameTable));
if (page == null || page.Attributes == null || page.Attributes[attr] == null) return String.Empty;
return page.Attributes[attr].Value;
}
catch (Exception e)
{
throw new ApplicationException("Error in GetPageAttribute: " + e.Message, e);
}
}
#endregion