Split out getXHTML for page elements