41 XNODE* iNode =
nullptr, *cNode =
nullptr;
42 wxString str, propValue, content;
43 wxCSConv conv( wxT(
"windows-1251" ) );
45 FILE* fp = wxFopen( aFileName, wxT(
"rt" ) );
51 if( !fgets( line,
sizeof( line ), fp )
57 fseek( fp, 0, SEEK_SET );
62 iNode =
new XNODE( wxXML_ELEMENT_NODE, wxT(
"www.lura.sk" ) );
78 cNode =
new XNODE( wxXML_ELEMENT_NODE, wxString( lexer.
CurText(), conv ) );
79 iNode->AddChild( cNode );
84 str = wxString( lexer.
CurText(), conv );
89 if( iNode->GetAttribute( wxT(
"Name" ), &propValue ) )
91 iNode->DeleteAttribute( wxT(
"Name" ) );
92 iNode->
AddAttribute( wxT(
"Name" ), propValue + wxT(
' ' ) + str );
99 else if( str != wxEmptyString )
102 content = cNode->GetNodeContent() + wxT(
' ' ) + str;
104 if( cNode->GetChildren() )
105 cNode->GetChildren()->SetContent( content );
107 cNode->AddChild(
new wxXmlNode( wxXML_TEXT_NODE, wxEmptyString, content ) );
114 aXmlDoc->SetRoot( iNode );