Example #1
0
/**
* @ingroup XmlParser
* @brief 애트리뷰트에 해당하는 값을 검색하여 int 변수에 저장한다.
* @param pszName Element 이름
* @param pszAttrName 애트리뷰트 이름
* @param iValue		애트리뷰트 값
* @param iIndex		Element 인덱스. 0 을 입력하면 첫번째 검색된 하위 Element 를 리턴하고 1 을 입력하면 두번째 검색된 하위 Element 를 리턴한다.
* @returns 성공하면 true 를 리턴하고 실패하면 false 를 리턴한다.
*/
bool CXmlSearch::SelectAttribute(const char * pszName, const char * pszAttrName, int & iValue, const int iIndex)
{
	CXmlElement * pclsElement = SelectElement(pszName, iIndex);
	if (pclsElement)
	{
		return pclsElement->SelectAttribute(pszAttrName, iValue);
	}

	return false;
}
Example #2
0
/**
* @ingroup XmlParser
* @brief 애트리뷰트에 해당하는 값을 검색한다.
* @param pszName Element 이름
* @param pszAttrName 애트리뷰트 이름
* @param iIndex		Element 인덱스. 0 을 입력하면 첫번째 검색된 하위 Element 를 리턴하고 1 을 입력하면 두번째 검색된 하위 Element 를 리턴한다.
* @returns 성공하면 애트리뷰트의 값을 리턴하고 그렇지 않으면 NULL 을 리턴한다.
*/
const char * CXmlSearch::SelectAttribute(const char * pszName, const char * pszAttrName, const int iIndex)
{
	CXmlElement * pclsElement = SelectElement(pszName, iIndex);
	if (pclsElement)
	{
		return pclsElement->SelectAttribute(pszAttrName);
	}

	return NULL;
}