KnowHowLangs
(Unterschied zwischen Versionen)
K (→C++) |
(→Snippets) |
||
| Zeile 12: | Zeile 12: | ||
=== Foren === | === Foren === | ||
=== Snippets === | === Snippets === | ||
| + | <source lang="cpp"> | ||
| + | CString CXmlNodeList::GetAttribute( int iItem, LPCTSTR strAttributeName ) | ||
| + | { | ||
| + | CXmlElementPtr pElement = m_pNodeList->Getitem( iItem ); | ||
| + | VARIANT varValue = pElement->getAttribute( _bstr_t( strAttributeName ) ); | ||
| + | if( varValue.bstrVal != NULL ) | ||
| + | return CString( varValue ); | ||
| + | else | ||
| + | return CString( _T("") ); | ||
| + | } | ||
| + | </source> | ||
== PHP == | == PHP == | ||
Version vom 09:02, 14. Sep. 2009
Inhaltsverzeichnis |
C++
Referenzen
Tutorials
FAQs
Foren
Snippets
<source lang="cpp"> CString CXmlNodeList::GetAttribute( int iItem, LPCTSTR strAttributeName ) { CXmlElementPtr pElement = m_pNodeList->Getitem( iItem ); VARIANT varValue = pElement->getAttribute( _bstr_t( strAttributeName ) ); if( varValue.bstrVal != NULL ) return CString( varValue ); else return CString( _T("") ); } </source>