const wchar_t* CMarkupNode::GetAttributeValue(int iIndex) { if( m_pOwner == NULL ) return NULL; if( m_nAttributes == 0 ) _MapAttributes(); if( iIndex < 0 || iIndex >= m_nAttributes ) return L""; return m_pOwner->m_pstrXML + m_aAttributes[iIndex].iValue; }
LPCTSTR CXmlNode::GetAttributeValue(int iIndex) { if( m_pOwner == NULL ) return NULL; if( m_nAttributes == 0 ) _MapAttributes(); if( iIndex < 0 || iIndex >= m_nAttributes ) return _T(""); return m_pOwner->m_pstrXML + m_aAttributes[iIndex].iValue; }
bool CMarkupNode::GetAttributeValue(int iIndex, wchar_t* pstrValue, SIZE_T cchMax) { if( m_pOwner == NULL ) return false; if( m_nAttributes == 0 ) _MapAttributes(); if( iIndex < 0 || iIndex >= m_nAttributes ) return false; wcsncpy(pstrValue, m_pOwner->m_pstrXML + m_aAttributes[iIndex].iValue, cchMax); return true; }
bool CXmlNode::GetAttributeValue(int iIndex, LPTSTR pstrValue, SIZE_T cchMax) { if( m_pOwner == NULL ) return false; if( m_nAttributes == 0 ) _MapAttributes(); if( iIndex < 0 || iIndex >= m_nAttributes ) return false; _tcsncpy_s(pstrValue,-1, m_pOwner->m_pstrXML + m_aAttributes[iIndex].iValue, cchMax); return true; }
bool CMarkupNode::HasAttribute(const wchar_t* pstrName) { if( m_pOwner == NULL ) return false; if( m_nAttributes == 0 ) _MapAttributes(); for( int i = 0; i < m_nAttributes; i++ ) { if( wcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) return true; } return false; }
const wchar_t* CMarkupNode::GetAttributeValue(const wchar_t* pstrName) { if( m_pOwner == NULL ) return NULL; if( m_nAttributes == 0 ) _MapAttributes(); for( int i = 0; i < m_nAttributes; i++ ) { if( wcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) return m_pOwner->m_pstrXML + m_aAttributes[i].iValue; } return L""; }
LPCTSTR CMarkupNode::GetAttributeValue(LPCTSTR pstrName) { if( m_pOwner == NULL ) return NULL; if( m_nAttributes == 0 ) _MapAttributes(); for( int i = 0; i < m_nAttributes; i++ ) { if( _tcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) return m_pOwner->m_pstrXML + m_aAttributes[i].iValue; } return _T(""); }
bool CXmlNode::HasAttribute(LPCTSTR pstrName) { if( m_pOwner == NULL ) return false; if( m_nAttributes == 0 ) _MapAttributes(); for( int i = 0; i < m_nAttributes; i++ ) { if( _tcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) return true; } return false; }
bool CMarkupNode::GetAttributeValue(const wchar_t* pstrName, wchar_t* pstrValue, SIZE_T cchMax) { if( m_pOwner == NULL ) return false; if( m_nAttributes == 0 ) _MapAttributes(); for( int i = 0; i < m_nAttributes; i++ ) { if( wcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) { wcsncpy(pstrValue, m_pOwner->m_pstrXML + m_aAttributes[i].iValue, cchMax); return true; } } return false; }
bool CXmlNode::GetAttributeValue(LPCTSTR pstrName, LPTSTR pstrValue, SIZE_T cchMax) { if( m_pOwner == NULL ) return false; if( m_nAttributes == 0 ) _MapAttributes(); for( int i = 0; i < m_nAttributes; i++ ) { if( _tcscmp(m_pOwner->m_pstrXML + m_aAttributes[i].iName, pstrName) == 0 ) { _tcsncpy_s(pstrValue,-1, m_pOwner->m_pstrXML + m_aAttributes[i].iValue, cchMax); return true; } } return false; }
bool CMarkupNode::HasAttributes() { if( m_pOwner == NULL ) return false; if( m_nAttributes == 0 ) _MapAttributes(); return m_nAttributes > 0; }
int CMarkupNode::GetAttributeCount() { if( m_pOwner == NULL ) return 0; if( m_nAttributes == 0 ) _MapAttributes(); return m_nAttributes; }