XmlCode contains methods to write out XML tags.
More...
#include <DataListenerSvc/XmlCode.h>
List of all members.
Detailed Description
XmlCode contains methods to write out XML tags.
It is used in conjunction with DataListenerSvc to create the XML log files which can be subsequently later parsed. Indent levels are specified manually by the user who must make sure everything is consistent.
- Author:
- Ben King
- Date:
- 2006-07-06
Definition at line 21 of file XmlCode.h.
Constructor & Destructor Documentation
| XmlCode::XmlCode |
( |
) |
[inline] |
Standard constructor.
Definition at line 25 of file XmlCode.h.
| virtual XmlCode::~XmlCode |
( |
) |
[inline, virtual] |
Member Function Documentation
Return just the data given to the function.
Definition at line 85 of file XmlCode.h.
XML declaration.
- Parameters:
-
| vers | XML version number |
| cod | XML encoding |
| stand | XML standalone |
Definition at line 99 of file XmlCode.h.
{
return "<?xml version=\"" + vers + "\" encoding=\"" + cod + "\" standalone=\"" + stand + "\"?>";
}
return an opening XML tag
Definition at line 51 of file XmlCode.h.
{
std::string indent="";
for (int i=0; i<level; i++){
indent = indent + " ";
}
return "\n" + indent + "<" + data + ">";
}
returns an opening XML tag
- Parameters:
-
| data | Name of the tag |
| level | Amount of indenting to print, i.e. what generation of tag |
| attribute | Attribute to include in tag (if used) |
| val | Value of the Attribute (if used) with this class. Return an opening XML tag which takes "attribute:value" pair |
Definition at line 39 of file XmlCode.h.
{
std::string indent="";
for (int i=0; i<level; i++){
indent = indent + " ";
}
return "\n" + indent + "<" + data + " " + attribute + "=\"" + val + "\">";
}
return a closing XML tag
Will return a new line if the tag is given any indent, i.e. it is a parent tag
Definition at line 66 of file XmlCode.h.
{
if (level != 0) {
std::string indent="";
for (int i=0; i<level; i++){
indent = indent + " ";
}
return "\n" + indent + "</" + data + ">\n";
}
else {
return "</" + data + ">";
}
}
Member Data Documentation
The documentation for this class was generated from the following file:
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiMonitor/src/DataListenerSvc/XmlCode.h