Example #1
0
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    XmlUtils::CXmlNode oNode;
    oNode.FromXmlFile(L"D:\\document.xml");

    return a.exec();
}
	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 );
				}
			}
		}
	}