// CXmlFormItem_Static.cpp
//

#include "stdafx.h"
#include "XmlFormItem_Static.h"

CXmlFormItem_Static::CXmlFormItem_Static()
{}

CXmlFormItem_Static::~CXmlFormItem_Static()
{}

bool CXmlFormItem_Static::BuildFromXml(IXMLDOMNode* node)
{
	/***
	USES_CONVERSION;

	CXMLDOMNode childNode;
	CXMLDOMNodeList children;
	cmString nodeName;

	children = node.GetChildNodes();
	
	for (long i = 0; i < children.GetLength(); i++) {
		childNode = children.GetItem(i);
	
		nodeName = childNode.GetNodeName();

		if (nodeName == _T("formItem")) {
			CXmlBaseFormItem::BuildFromXml(childNode);
		} else if (nodeName == _T("caption")) {
			caption_ = childNode.GetNodeTypedValue().bstrVal;
		}
	}

	***/
	return true;
}

bool CXmlFormItem_Static::AppendToDOMDocument(IXMLDOMDocument2* xmlDoc, IXMLDOMElement* parentElement)
{
	/***
	CXMLDOMElement newElement;
    CXMLDOMElement rectElement;
	CXMLDOMElement member;
   
    newElement = xmlDoc.CreateElement(GetXmlNodeName().c_str());

	CXmlBaseFormItem::AppendToDOMDocument(xmlDoc, newElement, parentIsValid);
	
	AppendMemberNode(_T("caption"), caption_, newElement, xmlDoc);

	parentElement.AppendChild(newElement);
	***/

	return true;
}

void CXmlFormItem_Static::SetCaption(const cmString& caption)
{
	caption_ = caption;
}

cmString CXmlFormItem_Static::GetCaption()
{
	return caption_;
}

enFormItemType CXmlFormItem_Static::GetItemType()
{
	return enFormItemType_Static;
}
	
void CXmlFormItem_Static::Clear()
{}

void CXmlFormItem_Static::SetDefaults()
{}