本文整理汇总了C++中xmlutils::CXmlNode类的典型用法代码示例。如果您正苦于以下问题:C++ CXmlNode类的具体用法?C++ CXmlNode怎么用?C++ CXmlNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CXmlNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fromXML
void SpPr::fromXML(XmlUtils::CXmlNode& node)
{
m_namespace = XmlUtils::GetNamespace(node.GetName());
Geometry.GetGeometryFrom(node);
Fill.GetFillFrom(node);
EffectList.GetEffectListFrom(node);
node.ReadAttributeBase(L"bwMode", bwMode);
XmlUtils::CXmlNodes oNodes;
if (node.GetNodes(_T("*"), oNodes))
{
int nCount = oNodes.GetCount();
for (int i = 0; i < nCount; ++i)
{
XmlUtils::CXmlNode oNode;
oNodes.GetAt(i, oNode);
CString strName = XmlUtils::GetNameNoNS(oNode.GetName());
if (_T("xfrm") == strName)
xfrm = oNode;
else if (_T("ln") == strName)
ln = oNode;
else if (_T("scene3d") == strName)
scene3d = oNode;
else if (_T("sp3d") == strName)
sp3d = oNode;
}
}
FillParentPointersForChilds();
}
示例2: fromXML
void CxnSp::fromXML(XmlUtils::CXmlNode& node)
{
m_namespace = XmlUtils::GetNamespace(node.GetName());
XmlUtils::CXmlNodes oNodes;
if (node.GetNodes(_T("*"), oNodes))
{
int nCount = oNodes.GetCount();
for (int i = 0; i < nCount; ++i)
{
XmlUtils::CXmlNode oNode;
oNodes.GetAt(i, oNode);
std::wstring strName = XmlUtils::GetNameNoNS(oNode.GetName());
if (_T("nvCxnSpPr") == strName)
nvCxnSpPr = oNode;
else if (_T("spPr") == strName)
spPr = oNode;
else if (_T("style") == strName)
style = oNode;
}
}
FillParentPointersForChilds();
}
示例3: fromXML
void NvGrpSpPr::fromXML(XmlUtils::CXmlNode& node)
{
cNvPr = node.ReadNode(_T("p:cNvPr"));
cNvGrpSpPr = node.ReadNode(_T("p:cNvGrpSpPr"));
nvPr = node.ReadNode(_T("p:nvPr"));
FillParentPointersForChilds();
}
示例4: fromXML
void EffectStyle::fromXML(XmlUtils::CXmlNode& node)
{
EffectList.GetEffectListFrom(node);
scene3d = node.ReadNode(_T("a:scene3d"));
sp3d = node.ReadNode(_T("a:sp3d"));
FillParentPointersForChilds();
}
示例5: main
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
XmlUtils::CXmlNode oNode;
oNode.FromXmlFile(L"D:\\document.xml");
return a.exec();
}
示例6: LoadFromXML
bool CPPTShape::LoadFromXML(const std::wstring& xml)
{
XmlUtils::CXmlNode oNodePict;
if (oNodePict.FromXmlString(xml))
{
return LoadFromXML(oNodePict);
}
return false;
}
示例7: fromXML
void CTblGridChange::fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("w:id"), m_oId );
XmlUtils::CXmlNode oNode_tblGrid;
if ( m_pTblGrid && oNode.GetNode( _T("w:tblGrid"), oNode_tblGrid ) )
m_pTblGrid->fromXML( oNode_tblGrid );
}
示例8: fromXML
void Blip::fromXML(XmlUtils::CXmlNode& node)
{
m_namespace = XmlUtils::GetNamespace(node.GetName());
node.ReadAttributeBase(L"r:embed", embed);
node.ReadAttributeBase(L"r:link", link);
node.ReadAttributeBase(L"cstate", cstate);
Effects.RemoveAll();
node.LoadArray(_T("*"), Effects);
FillParentPointersForChilds();
}
示例9: fromXML
void CRPrChange::fromXML(XmlUtils::CXmlNode& oNode)
{
if ( _T("w:rPrChange") != oNode.GetName() )
return;
oNode.ReadAttributeBase( _T("w:author"), m_sAuthor );
oNode.ReadAttributeBase( _T("w:date"), m_oDate );
oNode.ReadAttributeBase( _T("w:id"), m_oID );
XmlUtils::CXmlNode oNode_rPr;
if ( m_pRunPr.IsInit() && oNode.GetNode( _T("w:rPr"), oNode_rPr ) )
m_pRunPr->fromXML( oNode_rPr );
}
示例10: fromXMLOle
void GraphicFrame::fromXMLOle(XmlUtils::CXmlNode& node)
{
oleObject.Init();
node.ReadAttributeBase(L"progId", oleObject->m_sProgId);
node.ReadAttributeBase(L"r:id", oleObject->m_oId);
int imgW = node.GetAttributeInt(CString(L"imgW"), 0);
if(imgW > 0)
{
oleObject->m_oDxaOrig = Emu_To_Twips(imgW);
}
int imgH = node.GetAttributeInt(CString(L"imgH"), 0);
if(imgH > 0)
{
oleObject->m_oDyaOrig = Emu_To_Twips(imgH);
}
}
示例11: fromXML
void CNvGrpSpPr::fromXML(XmlUtils::CXmlNode& node)
{
XmlUtils::CXmlNode oNode;
if (node.GetNode(_T("a:grpSpLocks"), oNode))
{
oNode.ReadAttributeBase(L"noChangeAspect", noChangeAspect);
oNode.ReadAttributeBase(L"noGrp", noGrp);
oNode.ReadAttributeBase(L"noMove", noMove);
oNode.ReadAttributeBase(L"noResize", noResize);
oNode.ReadAttributeBase(L"noRot", noRot);
oNode.ReadAttributeBase(L"noSelect", noSelect);
oNode.ReadAttributeBase(L"noUngrp", noUngrp);
}
}
示例12: fromXML
void EffectLst::fromXML(XmlUtils::CXmlNode& node)
{
blur = node.ReadNode(_T("a:blur"));
fillOverlay = node.ReadNode(_T("a:fillOverlay"));
glow = node.ReadNode(_T("a:glow"));
innerShdw = node.ReadNode(_T("a:innerShdw"));
outerShdw = node.ReadNode(_T("a:outerShdw"));
prstShdw = node.ReadNode(_T("a:prstShdw"));
reflection = node.ReadNode(_T("a:reflection"));
softEdge = node.ReadNode(_T("a:softEdge"));
FillParentPointersForChilds();
}
示例13: read
void FontTable::read(const OOX::CPath& oPath)
{
m_fonts.clear();
XmlUtils::CXmlNode oFonts;
oFonts.FromXmlFile( oPath.GetPath(), true );
if ( _T("w:fonts") == oFonts.GetName() )
{
XmlUtils::CXmlNodes oFontList;
oFonts.GetNodes( _T("w:font"), oFontList );
for ( int nFontIndex = 0; nFontIndex < oFontList.GetCount(); ++nFontIndex )
{
XmlUtils::CXmlNode oFontNode;
if ( oFontList.GetAt( nFontIndex, oFontNode ) )
{
Font oFont;
oFont.fromXML( oFontNode );
m_fonts.push_back( oFont );
}
}
}
}
示例14:
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;
}
}
}
示例15: if
void CTc::fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("w:id"), m_sId );
XmlUtils::CXmlNodes oChilds;
if ( oNode.GetNodes( _T("*"), oChilds ) )
{
XmlUtils::CXmlNode oItem;
for ( int nIndex = 0; nIndex < oChilds.GetCount(); nIndex++ )
{
if ( oChilds.GetAt( nIndex, oItem ) )
{
CString sName = oItem.GetName();
WritingElement *pItem = NULL;
/* if ( _T("w:altChunk") == sName )
pItem = new CAltChunk( oItem );
else */if ( _T("w:bookmarkEnd") == sName )
pItem = new CBookmarkEnd( oItem );
else if ( _T("w:bookmarkStart") == sName )
pItem = new CBookmarkStart( oItem );
else if ( _T("w:commentRangeEnd") == sName )
pItem = new CCommentRangeEnd( oItem );
else if ( _T("w:commentRangeStart") == sName )
pItem = new CCommentRangeStart( oItem );
//else if ( _T("w:customXml") == sName )
// pItem = new CCustomXml( oItem );
else if ( _T("w:customXmlDelRangeEnd") == sName )
pItem = new CCustomXmlDelRangeEnd( oItem );
else if ( _T("w:customXmlDelRangeStart") == sName )
pItem = new CCustomXmlDelRangeStart( oItem );
else if ( _T("w:customXmlInsRangeEnd") == sName )
pItem = new CCustomXmlInsRangeEnd( oItem );
else if ( _T("w:customXmlInsRangeStart") == sName )
pItem = new CCustomXmlInsRangeStart( oItem );
else if ( _T("w:customXmlMoveFromRangeEnd") == sName )
pItem = new CCustomXmlMoveFromRangeEnd( oItem );
else if ( _T("w:customXmlMoveFromRangeStart") == sName )
pItem = new CCustomXmlMoveFromRangeStart( oItem );
else if ( _T("w:customXmlMoveToRangeEnd") == sName )
pItem = new CCustomXmlMoveToRangeEnd( oItem );
else if ( _T("w:customXmlMoveToRangeStart") == sName )
pItem = new CCustomXmlMoveToRangeStart( oItem );
//else if ( _T("w:del") == sName )
// pItem = new CDel( oItem );
//else if ( _T("w:ins") == sName )
// pItem = new CIns( oItem );
//else if ( _T("w:moveFrom") == sName )
// pItem = new CMoveFrom( oItem );
else if ( _T("w:moveFromRangeEnd") == sName )
pItem = new CMoveToRangeEnd( oItem );
else if ( _T("w:moveFromRangeStart") == sName )
pItem = new CMoveToRangeStart( oItem );
//else if ( _T("w:moveTo") == sName )
// pItem = new CMoveTo( oItem );
else if ( _T("w:moveToRangeEnd") == sName )
pItem = new CMoveToRangeEnd( oItem );
else if ( _T("w:moveToRangeStart") == sName )
pItem = new CMoveToRangeStart( oItem );
else if ( _T("m:oMath") == sName )
pItem = new COMath( oItem );
else if ( _T("m:oMathPara") == sName )
pItem = new COMathPara( oItem );
else if ( _T("w:p") == sName )
pItem = new CParagraph( oItem );
else if ( _T("w:permEnd") == sName )
pItem = new CPermEnd( oItem );
else if ( _T("w:permStart") == sName )
pItem = new CPermStart( oItem );
else if ( _T("w:proofErr") == sName )
pItem = new CProofErr( oItem );
else if ( _T("w:sdt") == sName )
pItem = new CSdt( oItem );
else if ( _T("w:tbl") == sName )
pItem = new CTbl( oItem );
else if ( _T("w:tcPr") == sName )
{
pItem = m_oTableCellProperties = new CTableCellProperties( oItem );
}
if ( pItem )
m_arrItems.push_back( pItem );
}
}
}
}