public double GetPageHeight(string pageId)
{
double retVal = 80.0;
XmlDocument xmlPageDoc = GetPageContent(pageId);
XmlNodeList nodeList = xmlPageDoc.SelectNodes("//*[one:Position]", GetNSManager(xmlPageDoc.NameTable));
if (nodeList != null)
{
foreach (XmlNode node in nodeList)
{
XmlElement xmlPosition = node["one:Position"];
XmlElement xmlSize = node["one:Size"];
if (xmlPosition == null || xmlSize == null) continue;
XmlAttribute xmlY = xmlPosition.Attributes["y"];
XmlAttribute xmlHeight = xmlSize.Attributes["height"];
double y = xmlY == null ? 0 : Double.Parse(xmlY.Value);
double height = xmlHeight == null ? 0 : Double.Parse(xmlHeight.Value);
retVal = Math.Max(retVal, y + height);
}
}
return retVal;
}