1
1
//////////////////////////////////////////////////////////////////////////////
2
2
//////////////////////////////////////////////////////////////////////////////
4
// copyright : (C) 2008 by Eran Ifrah
5
// file name : xmlutils.h
4
// copyright : (C) 2008 by Eran Ifrah
5
// file name : xmlutils.h
7
7
// -------------------------------------------------------------------------
10
// / __ \ | | | | (_) |
11
// | / \/ ___ __| | ___| | _| |_ ___
12
// | | / _ \ / _ |/ _ \ | | | __/ _ )
13
// | \__/\ (_) | (_| | __/ |___| | || __/
14
// \____/\___/ \__,_|\___\_____/_|\__\___|
18
// This program is free software; you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation; either version 2 of the License, or
21
// (at your option) any later version.
10
// / __ \ | | | | (_) |
11
// | / \/ ___ __| | ___| | _| |_ ___
12
// | | / _ \ / _ |/ _ \ | | | __/ _ )
13
// | \__/\ (_) | (_| | __/ |___| | || __/
14
// \____/\___/ \__,_|\___\_____/_|\__\___|
18
// This program is free software; you can redistribute it and/or modify
19
// it under the terms of the GNU General Public License as published by
20
// the Free Software Foundation; either version 2 of the License, or
21
// (at your option) any later version.
23
23
//////////////////////////////////////////////////////////////////////////////
24
24
//////////////////////////////////////////////////////////////////////////////
47
47
/// Find the last child node of parent with a given name. NULL if no childs exist
48
48
/// \param parent the parent node whom to be searched
49
/// \param name the element's tag name
49
/// \param name the element's tag name
50
50
static wxXmlNode *FindLastByTagName(const wxXmlNode *parent, const wxString &tagName);
54
54
* update node property. If multiple properties with the same name exist, this function updates
55
55
* the first occurance
57
57
* \param name property name
58
58
* \param value new value to set
63
63
* Find the first child node of parent with a given name. NULL if no childs exist
64
64
* \param the parent node whom to be searched
65
* \param the element's tag name
65
* \param the element's tag name
67
67
static wxXmlNode *FindFirstByTagName(const wxXmlNode *parent, const wxString &tagName);
71
71
* Set the content of node. This function replaces any existing content of node
73
73
* \param text content
75
75
static void SetNodeContent(wxXmlNode *node, const wxString &text);
78
* Set the content of node. This function replaces any existing content of node
82
static void SetCDATANodeContent(wxXmlNode *node, const wxString &text);
78
85
* Read string property from the given node
79
86
* \param propName the property name