本文整理汇总了C++中xmlutils::CXmlNode::GetAttributeBase方法的典型用法代码示例。如果您正苦于以下问题:C++ CXmlNode::GetAttributeBase方法的具体用法?C++ CXmlNode::GetAttributeBase怎么用?C++ CXmlNode::GetAttributeBase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xmlutils::CXmlNode
的用法示例。
在下文中一共展示了CXmlNode::GetAttributeBase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void FontTable::Font::fromXML(XmlUtils::CXmlNode& oNode)
{
if ( _T("w:font") == oNode.GetName() )
{
m_name = std::wstring(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:name"))));
XmlUtils::CXmlNode oChild;
if ( oNode.GetNode( _T("w:panose1"), oChild ) )
m_panose1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:charset"), oChild ) )
m_charset = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:family"), oChild ) )
m_family = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:pitch"), oChild ) )
m_pitch = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:sig"), oChild ) )
{
m_usb0 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb0"))));
m_usb1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb1"))));
m_usb2 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb2"))));
m_usb3 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:usb3"))));
m_csb0 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:csb0"))));
m_csb1 = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:csb1"))));
}
}
}
示例2:
void Numbering::Level::fromXML(XmlUtils::CXmlNode& oNode)
{
if ( _T("w:lvl") == oNode.GetName() )
{
Ilvl = _wtoi(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:ilvl"))));
Tentative = _wtoi(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:tentative"))));
Tplc = std::wstring(static_cast<const wchar_t*>(oNode.GetAttributeBase( _T("w:tentative"))));
XmlUtils::CXmlNode oChild;
if ( oNode.GetNode( _T("w:suff"), oChild ) )
Suffix = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:lvlText"), oChild ) )
Text = std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:lvlJc"), oChild ) )
Align = Logic::Align(std::wstring(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val")))));
if ( oNode.GetNode( _T("w:start"), oChild ) )
Start = _wtoi(static_cast<const wchar_t*>(oChild.GetAttributeBase( _T("w:val"))));
if ( oNode.GetNode( _T("w:numFmt"), oChild ) )
{
OOX::Logic::NumFormat fmt;
fmt.fromXML(oChild);
NumFmt = fmt;
}
}
}