From ebd41fbf7c24790de31bd1aee53e6904ef786ae3 Mon Sep 17 00:00:00 2001 From: Olivier Couet <olivier.couet@cern.ch> Date: Wed, 20 Apr 2016 15:13:50 +0200 Subject: [PATCH] Doxygen --- tutorials/xml/DOMParsePerson.C | 34 ++++++++++++++++++++-------------- tutorials/xml/DOMRecursive.C | 31 ++++++++++++++++++------------- tutorials/xml/SAXHandler.C | 34 ++++++++++++++++++++-------------- tutorials/xml/index.md | 3 +++ tutorials/xml/xmlnewfile.C | 11 ++++++++--- tutorials/xml/xmlreadfile.C | 14 ++++++++++---- 6 files changed, 79 insertions(+), 48 deletions(-) create mode 100644 tutorials/xml/index.md diff --git a/tutorials/xml/DOMParsePerson.C b/tutorials/xml/DOMParsePerson.C index 1bd2ac24d30..8beb1589a0c 100644 --- a/tutorials/xml/DOMParsePerson.C +++ b/tutorials/xml/DOMParsePerson.C @@ -1,17 +1,23 @@ -////////////////////////////////////////////////////////////////////////////// -// -// ROOT implementation of a XML DOM Parser -// -// This is an example of how Dom Parser works. It will parse the xml file -// (person.xml) to the Person object. -// A DTD validation will be run on this example. -// -// To run this program -// .x DOMParsePerson.C+ -// -// Requires: person.xml and person.dtd -// -////////////////////////////////////////////////////////////////////////////// +/// \file +/// \ingroup tutorial_xml +/// ROOT implementation of a XML DOM Parser +/// +/// This is an example of how Dom Parser works. It will parse the xml file +/// (person.xml) to the Person object. +/// A DTD validation will be run on this example. +/// +/// To run this program +/// ~~~ {.cpp} +/// .x DOMParsePerson.C+ +/// ~~~ +/// +/// Requires: person.xml and person.dtd +/// +/// \macro_output +/// \macro_code +/// +/// \author Sergey Linev + #include <Riostream.h> #include <TDOMParser.h> diff --git a/tutorials/xml/DOMRecursive.C b/tutorials/xml/DOMRecursive.C index ee925dcb61e..6f6cfbc3744 100644 --- a/tutorials/xml/DOMRecursive.C +++ b/tutorials/xml/DOMRecursive.C @@ -1,16 +1,21 @@ -////////////////////////////////////////////////////////////////////////////// -// -// ROOT implementation of a XML DOM Parser -// -// This is an example of how Dom Parser walks the DOM tree recursively. -// This example will parse any xml file. -// -// To run this program -// .x DOMRecursive.C+ -// -// Requires: person.xml -// -////////////////////////////////////////////////////////////////////////////// +/// \file +/// \ingroup tutorial_xml +/// ROOT implementation of a XML DOM Parser +/// +/// This is an example of how Dom Parser walks the DOM tree recursively. +/// This example will parse any xml file. +/// +/// To run this program +/// ~~~ {.cpp} +/// .x DOMRecursive.C+ +/// ~~~ +/// +/// Requires: `person.xml` +/// +/// \macro_output +/// \macro_code +/// +/// \author Sergey Linev #include <Riostream.h> #include <TDOMParser.h> diff --git a/tutorials/xml/SAXHandler.C b/tutorials/xml/SAXHandler.C index f8ce4539081..5deee693a58 100644 --- a/tutorials/xml/SAXHandler.C +++ b/tutorials/xml/SAXHandler.C @@ -1,17 +1,23 @@ -////////////////////////////////////////////////////////////////////////////// -// -// ROOT implementation of a simple SAX Handler. -// -// This handler uses TSAXParser, a SAX Parser using the SAX interface -// of libxml2. This script will output all elements of the original xml -// file, if sucessfully parsed. -// -// To run this program do: -// .x SAXHandler.C -// -// Requires: saxexample.xml -// -////////////////////////////////////////////////////////////////////////////// +/// \file +/// \ingroup tutorial_xml +/// ROOT implementation of a simple SAX Handler. +/// +/// This handler uses TSAXParser, a SAX Parser using the SAX interface +/// of libxml2. This script will output all elements of the original xml +/// file, if successfully parsed. +/// +/// To run this program do: +/// ~~~ {.cpp} +/// .x SAXHandler.C +/// ~~~ +/// +/// Requires: `saxexample.xml` +/// +/// +/// \macro_output +/// \macro_code +/// +/// \author Sergey Linev #include <Riostream.h> #include <TList.h> diff --git a/tutorials/xml/index.md b/tutorials/xml/index.md new file mode 100644 index 00000000000..a6693c4ce57 --- /dev/null +++ b/tutorials/xml/index.md @@ -0,0 +1,3 @@ +\defgroup tutorial_xml XML tutorials +\ingroup Tutorials +\brief XML examples. diff --git a/tutorials/xml/xmlnewfile.C b/tutorials/xml/xmlnewfile.C index d21a237b7c5..2ae71a82542 100644 --- a/tutorials/xml/xmlnewfile.C +++ b/tutorials/xml/xmlnewfile.C @@ -1,5 +1,10 @@ -// Example to create a new xml file with the TXMLEngine class -//Author: Sergey Linev +/// \file +/// \ingroup tutorial_xml +/// Example to create a new xml file with the TXMLEngine class +/// +/// \macro_code +/// +/// \author Sergey Linev #include "TXMLEngine.h" @@ -32,7 +37,7 @@ void xmlnewfile(const char* filename = "example.xml") xml->NewChild(child4, ns4, "subchild2", "subchild2 content"); xml->NewChild(child4, ns4, "subchild3", "subchild3 content"); - // now create doccumnt and assign main node of document + // now create document and assign main node of document XMLDocPointer_t xmldoc = xml->NewDoc(); xml->DocSetRootElement(xmldoc, mainnode); diff --git a/tutorials/xml/xmlreadfile.C b/tutorials/xml/xmlreadfile.C index 53d167e5179..ae19b07a8cb 100644 --- a/tutorials/xml/xmlreadfile.C +++ b/tutorials/xml/xmlreadfile.C @@ -1,7 +1,13 @@ -// Example to read and parse any xml file, supported by TXMLEngine class -// The input file, produced by xmlnewfile.C macro is used -// If you need full xml syntax support, use TXMLParser instead -//Author: Sergey Linev +/// \file +/// \ingroup tutorial_xml +/// Example to read and parse any xml file, supported by TXMLEngine class +/// The input file, produced by xmlnewfile.C macro is used +/// If you need full xml syntax support, use TXMLParser instead +/// +/// \macro_output +/// \macro_code +/// +/// \author Sergey Linev #include "TXMLEngine.h" -- GitLab