2025.6.1
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
|
||||
HXmlReport::HXmlReport()
|
||||
{
|
||||
HXmlElement* psXmlElement = new HXmlElement("Root");
|
||||
HXmlElement* psXmlElement = new HXmlElement("ModelFile");
|
||||
m_apPath.push_back(psXmlElement);
|
||||
psXmlElement->SetAttribute("rel", "stylesheet");
|
||||
m_sDocument.LinkEndChild(psXmlElement);
|
||||
}
|
||||
|
||||
HXmlReport::~HXmlReport()
|
||||
{
|
||||
}
|
||||
@@ -24,6 +24,7 @@ void HXmlReport::SaveFile(const char* pcReportPath, const char* pcXslFile)
|
||||
|
||||
// Instead of directly write into file, plug a printer to XML document, to "write" xml in a std::string
|
||||
TiXmlPrinter printer;
|
||||
printer.SetIndent("\t");
|
||||
m_sDocument.Accept(&printer);
|
||||
|
||||
// Write xst information + printer string into file
|
||||
@@ -58,6 +59,7 @@ void HXmlReport::addNode(HXmlElement* psNewNode)
|
||||
{
|
||||
if(psNewNode == NULL)
|
||||
return;
|
||||
|
||||
if (m_apPath.empty())
|
||||
{
|
||||
//no tree create
|
||||
@@ -72,6 +74,7 @@ void HXmlReport::createSubNode(const char* pcNameNode)
|
||||
HXmlElement*psNewNode = new HXmlElement(pcNameNode);
|
||||
if (psNewNode == NULL)
|
||||
return;
|
||||
|
||||
if (m_apPath.empty())
|
||||
{
|
||||
//no tree create
|
||||
@@ -80,5 +83,4 @@ void HXmlReport::createSubNode(const char* pcNameNode)
|
||||
|
||||
m_apPath.back()->LinkEndChild(psNewNode);
|
||||
m_apPath.push_back(psNewNode);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user