当前位置: 首页>>代码示例>>C++>>正文


C++ CXmlNode::GetNode方法代码示例

本文整理汇总了C++中xmlutils::CXmlNode::GetNode方法的典型用法代码示例。如果您正苦于以下问题:C++ CXmlNode::GetNode方法的具体用法?C++ CXmlNode::GetNode怎么用?C++ CXmlNode::GetNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xmlutils::CXmlNode的用法示例。


在下文中一共展示了CXmlNode::GetNode方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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"))));	
			}
		}
	}
开发者ID:Alsan,项目名称:ONLYOFFICE-OnlineEditors,代码行数:26,代码来源:Font.cpp

示例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;
			}
		}

		

		
		
	}
开发者ID:Alsan,项目名称:ONLYOFFICE-OnlineEditors,代码行数:35,代码来源:Level.cpp

示例3: LoadFromXML

bool CPPTShape::LoadFromXML(XmlUtils::CXmlNode& oNodePict)
{
    std::wstring id = oNodePict.GetAttributeOrValue(_T("type"));
    bool isPathList = false;
    if (id != _T(""))
    {
        SetShapeType((PPTShapes::ShapeType)XmlUtils::GetInteger(id));
    }
    else
    {
        XmlUtils::CXmlNode oNodeTemplate;
        if (oNodePict.GetNode(_T("template"), oNodeTemplate))
        {
            std::wstring strAdj = oNodeTemplate.GetAttributeOrValue(_T("adj"));
            LoadAdjustValuesList(strAdj);

            XmlUtils::CXmlNode oNodeGuides;
            if (oNodeTemplate.GetNode(_T("v:formulas"), oNodeGuides))
            {
                LoadGuidesList(oNodeGuides.GetXml());
            }

            std::wstring strPath = oNodeTemplate.GetAttributeOrValue(_T("path"));
            if (strPath != _T(""))
            {
                LoadPathList(strPath);
                isPathList = true;
            }
        }
    }

    XmlUtils::CXmlNode oNodeGuides;
    if (oNodePict.GetNode(_T("path"), oNodeGuides))
    {
        std::wstring strPath = oNodeGuides.GetAttributeOrValue(_T("val"));
        if (strPath != _T(""))
        {
            LoadPathList(strPath);
            isPathList = true;
        }
    }

    if (!isPathList)
        ReCalculate();
    return true;
}
开发者ID:ONLYOFFICE,项目名称:core,代码行数:46,代码来源:PptShape.cpp

示例4: 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 );

		}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:10,代码来源:Table.cpp

示例5: 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);
			}
		}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:14,代码来源:CNvGrpSpPr.cpp

示例6: 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 );

		}
开发者ID:Alsan,项目名称:ONLYOFFICE-OnlineEditors,代码行数:15,代码来源:RunProperty.cpp

示例7: LoadFromXMLShapeType

bool CPPTShape::LoadFromXMLShapeType(XmlUtils::CXmlNode& oNodeShapeType) // vml object
{		// из за особенносей форматирования vmlDrawing могут вылезти пустые текстовые значения - value ..
    std::wstring sId = oNodeShapeType.GetAttribute(_T("o:spt"));

    bool bIsNeedRecalc = true;
    if (sId != _T(""))
    {
        int id = XmlUtils::GetInteger(sId);
        if (id > 0)
        {
            SetShapeType((PPTShapes::ShapeType)id);
            //ReCalculate();
            m_eType = (PPTShapes::ShapeType)id;
        }
    }
    std::wstring strAdj = oNodeShapeType.GetAttribute(_T("adj"));
    if (strAdj != _T(""))
        LoadAdjustValuesList(strAdj);

    XmlUtils::CXmlNode oNodeGuides;
    if (oNodeShapeType.GetNode(_T("v:formulas"), oNodeGuides))
    {
        LoadGuidesList(oNodeGuides.GetXml());
    }

    XmlUtils::CXmlNode oNodePath;
    if (oNodeShapeType.GetNode(_T("v:path"), oNodePath))
    {
        std::wstring strTextR = oNodePath.GetAttribute(_T("textboxrect"));
        if (strTextR != _T(""))
            LoadTextRect(strTextR);
    }

    XmlUtils::CXmlNode oNodeAHs;
    if (oNodeShapeType.GetNode(_T("v:handles"), oNodeAHs))
    {
        LoadAHList(oNodeAHs);
    }

    std::wstring strPath = oNodeShapeType.GetAttribute(_T("path"));
    if (strPath != _T(""))
    {
        LoadPathList(strPath);
    }

    XmlUtils::CXmlNode oNodeTextPath;
    if (oNodeShapeType.GetNode(_T("v:textpath"), oNodeTextPath))
    {
        if (m_eType < PPTShapes::ShapeType::sptCTextPlain || m_eType > PPTShapes::ShapeType::sptCTextCanDown)
            m_eType = PPTShapes::ShapeType::sptCTextPlain;
    }

    std::wstring strFilled = oNodeShapeType.GetAttribute(_T("filled"));
    std::wstring strStroked = oNodeShapeType.GetAttribute(_T("stroked"));

    if (strFilled != _T(""))
    {
        if (strFilled == _T("false") || strFilled == _T("f"))
            m_bIsFilled = false;
        else
            m_bIsFilled = true;
    }

    if (strStroked != _T(""))
    {
        if (strStroked == _T("false") || strStroked == _T("f"))
            m_bIsStroked = false;
        else
            m_bIsStroked = true;
    }
    XmlUtils::CXmlNode oNodeSignature;
    if (oNodeShapeType.GetNode(_T("o:signatureline"), oNodeSignature))
    {
        m_oSignatureLine = oNodeSignature;
    }

    ReCalculate();
    return true;
}
开发者ID:ONLYOFFICE,项目名称:core,代码行数:79,代码来源:PptShape.cpp

示例8: fromXML

		void GraphicFrame::fromXML(XmlUtils::CXmlNode& node)
		{
			XmlUtils::CXmlNodes oNodes;
			if (node.GetNodes(_T("*"), oNodes))
			{
				int count = oNodes.GetCount();
				for (int i = 0; i < count; ++i)
				{
					XmlUtils::CXmlNode oNode;
					oNodes.GetAt(i, oNode);
					CString strName = XmlUtils::GetNameNoNS(oNode.GetName());

					if (_T("xfrm") == strName)
						xfrm = oNode;
					else if (_T("nvGraphicFramePr") == strName)
						nvGraphicFramePr = oNode;
					
					if (_T("graphic") == strName)
					{
						XmlUtils::CXmlNode oNodeData;
						if (oNode.GetNode(_T("a:graphicData"), oNodeData))
						{
							XmlUtils::CXmlNode oNode1 = oNodeData.ReadNodeNoNS(_T("tbl"));
							if (oNode1.IsValid())
							{
                                table = oNode1;
								return;
							}
							XmlUtils::CXmlNode oNode2 = oNodeData.ReadNodeNoNS(_T("oleObj"));
							if (oNode2.IsValid())
							{
								fromXMLOle(oNode2);
								oNode2.ReadAttributeBase(L"spid", spid);
								pic = oNode2.ReadNode(_T("p:pic"));

								if (pic.is_init())
								{
									xfrm.Merge(pic->spPr.xfrm);
								}
								return;
							}
							XmlUtils::CXmlNode oNode3 = oNodeData.ReadNodeNoNS(_T("AlternateContent"));
							if (oNode3.IsValid())
							{
								XmlUtils::CXmlNode oNodeC;
								if (oNode3.GetNode(_T("mc:Choice"), oNodeC))
								{
									XmlUtils::CXmlNode oNodeO;
									if (oNodeC.GetNode(_T("p:oleObj"), oNodeO))
									{
										oNodeO.ReadAttributeBase(L"spid", spid);
									}
								}

								XmlUtils::CXmlNode oNodeFallback;
								if (oNode3.GetNode(_T("mc:Fallback"), oNodeFallback))
								{
									XmlUtils::CXmlNode oNodeO;
									if (oNodeFallback.GetNode(_T("p:oleObj"), oNodeO))
									{
										fromXMLOle(oNodeO);
										pic = oNodeO.ReadNode(_T("p:pic"));

										if (pic.is_init())
										{
											xfrm.Merge(pic->spPr.xfrm);
										}
									}
								}
							}
							XmlUtils::CXmlNode oNode4 = oNodeData.ReadNode(_T("dgm:relIds"));
							if (oNode4.IsValid())
							{
								smartArt = oNode4;
							}
							XmlUtils::CXmlNode oNode5 = oNodeData.ReadNode(_T("c:chart"));
							if (oNode5.IsValid())
							{
								chartRec = oNode5;
							}
							XmlUtils::CXmlNode oNode6 = oNodeData.ReadNode(_T("com:legacyDrawing"));
							if (oNode6.IsValid())
							{
								oNode6.ReadAttributeBase(L"spid", spid);
							}
						}
					}
				}
			}
			if(pic.IsInit() && oleObject.IsInit())
			{
				pic->oleObject = oleObject;
				pic->blipFill.blip->oleRid = oleObject->m_oId.get().ToString();
			}
			
			FillParentPointersForChilds();
		}
开发者ID:alexandervnuchkov,项目名称:core,代码行数:97,代码来源:GraphicFrame.cpp


注:本文中的xmlutils::CXmlNode::GetNode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。