PhoenixXml  0.1.0
Xml parser for Phoenix
Loading...
Searching...
No Matches
pxml_utils.cpp File Reference
#include "pxml_utils.h"
+ Include dependency graph for pxml_utils.cpp:

Go to the source code of this file.

Macros

#define ALLOWED_ATTRIBUTE_CHAR   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:-"
 List of allowed char as attribute name.
 
#define ALLOWED_BALISE_CHAR   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:?!-"
 List of allowed char as balise name.
 

Functions

PString pxml_attrStr (const PXmlAttr &xmlAttr, bool isSvg)
 Convert attribute in string.
 
PString pxml_baliseStr (const PXml &xml, bool isSvg)
 Convert xml in string.
 
PXml pxml_eraseVecChild (const PXml &xml, const PString &childName)
 Erase the childs of the current xml if it has childName as name.
 
bool pxml_getAttrIfExist (PXmlAttr &attr, const PXml &xml, const PString &attrName)
 Get the attribute with given name if exist.
 
bool pxml_getChildIfExist (PXml &match, const PXml &xml, const PString &childName)
 Get the child with given name if exist.
 
PXmlpxml_getChildPtr (PXml &xml, const PString &childName)
 Get the child with given name if exist.
 
PString pxml_getFullContent (const PXml &xml)
 Get the content of the PXml (children or value)
 
bool pxml_getVecChildIfExist (PVecXml &vecMatch, const PXml &xml, const PString &childName)
 Get the vector of childs with given name if exist.
 
bool pxml_isAttributeEnd (PXml &parent, PFileParser &parser)
 Say if it is the end of the attribute definition of the current balise.
 
bool pxml_parserContent (PXml &xml, const PString &fileContent, bool isSvg)
 Parse a PXml with a file content.
 
bool pxml_parserFile (PXml &xml, const PPath &fileName, bool isSvg)
 Parse a PXml with a file.
 
bool pxml_parserXmlAttribute (PXml &parent, PFileParser &parser)
 Parse the attribute of a xml balise.
 
bool pxml_parserXmlContent (PXml &parent, PFileParser &parser, bool isMainBalise)
 Parse the content of an xml balise.
 
bool pxml_saveFile (const PPath &fileName, const PXml &xml, bool isSvg)
 Save a xml in a file.
 
void pxml_setAttr (PXml &xml, const PString &nameAttr, const PString &valueAttr)
 Set a value to an attribute.
 
PFileParser pxml_setXmlParser (const PString &fileContent, bool isSvg)
 Set the PFileParser for xml.
 
PString pxml_vecAttrStr (const PVecXmlAttr &vecXmlAttr, bool isSvg)
 Convert attributes in string.
 
PString pxml_vecXmlStr (const PVecXml &vecXml, bool isSvg)
 Convert a vecto of xml in string.
 

Macro Definition Documentation

◆ ALLOWED_ATTRIBUTE_CHAR

#define ALLOWED_ATTRIBUTE_CHAR   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:-"

List of allowed char as attribute name.

Definition at line 11 of file pxml_utils.cpp.

Referenced by pxml_parserXmlAttribute().

◆ ALLOWED_BALISE_CHAR

#define ALLOWED_BALISE_CHAR   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:?!-"

List of allowed char as balise name.

Definition at line 8 of file pxml_utils.cpp.

Referenced by pxml_parserXmlContent().

Function Documentation

◆ pxml_attrStr()

PString pxml_attrStr ( const PXmlAttr & xmlAttr,
bool isSvg )

Convert attribute in string.

Parameters
xmlAttr: xml attribute to be converted into string
isSvg: say if the output xml has to be SVG like (with no space between chevron and newline between attribute
Returns
output string

Definition at line 368 of file pxml_utils.cpp.

368 {
369 PString body(" ");
370 body += xmlAttr.getName() + "=\"" + xmlAttr.getValue() + "\"";
371 if(isSvg){
372 body += "\n\t";
373 }
374 return body;
375}
const PString & getName() const
Get the variable p_name.
Definition PXml.cpp:68
const PString & getValue() const
Get the variable p_value.
Definition PXml.cpp:82

References PXmlAttr::getName(), and PXmlAttr::getValue().

Referenced by pxml_vecAttrStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_baliseStr()

PString pxml_baliseStr ( const PXml & xml,
bool isSvg )

Convert xml in string.

Parameters
xml: xml to be converted into string
isSvg: say if the output xml has to be SVG like (with no space between chevron and newline between attribute
Returns
output string

Definition at line 318 of file pxml_utils.cpp.

318 {
319 PString body(""), name(xml.getName());
320 PString baseXmlNewLine("\n");
321 if(isSvg){
322 baseXmlNewLine = "";
323 }
324 if(xml.getIsText()){
325 body += xml.getValue();
326 }else{
327 if(name != ""){
328 body += "<";
329 body += name;
330 body += pxml_vecAttrStr(xml.getVecAttr(), isSvg);
331
332 if(name == "?xml"){body += " ?>\n";}
333 else if(name == "!--"){body += " -->\n";}
334 else if(xml.getIsCompact()){
335 body += " />"+baseXmlNewLine;
336 }else{
337 body += ">"+baseXmlNewLine;
338 body += pxml_vecXmlStr(xml.getVecChild(), isSvg);
339 body += xml.getValue();
340 body += "</"+ name + ">" + baseXmlNewLine;
341 }
342 }else{
343
344 body += pxml_vecXmlStr(xml.getVecChild(), isSvg);
345 }
346 }
347 return body;
348}
bool getIsText() const
Get the variable p_isText.
Definition PXml.cpp:236
const std ::vector< PXml > & getVecChild() const
Get the variable p_vecChild.
Definition PXml.cpp:264
const PString & getValue() const
Get the variable p_value.
Definition PXml.cpp:222
bool getIsCompact() const
Get the variable p_isCompact.
Definition PXml.cpp:208
const std ::vector< PXmlAttr > & getVecAttr() const
Get the variable p_vecAttr.
Definition PXml.cpp:250
const PString & getName() const
Get the variable p_name.
Definition PXml.cpp:194
PString pxml_vecAttrStr(const PVecXmlAttr &vecXmlAttr, bool isSvg)
Convert attributes in string.
PString pxml_vecXmlStr(const PVecXml &vecXml, bool isSvg)
Convert a vecto of xml in string.

References PXml::getIsCompact(), PXml::getIsText(), PXml::getName(), PXml::getValue(), PXml::getVecAttr(), PXml::getVecChild(), pxml_vecAttrStr(), and pxml_vecXmlStr().

Referenced by pxml_saveFile(), and pxml_vecXmlStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_eraseVecChild()

PXml pxml_eraseVecChild ( const PXml & xml,
const PString & childName )

Erase the childs of the current xml if it has childName as name.

Parameters
xml: current input
childName: name of the childs to be erased
Returns
output xml without childs named childName

Definition at line 288 of file pxml_utils.cpp.

288 {
289 PXml out;
290 out.setName(xml.getName());
291 out.setValue(xml.getValue());
292 out.setVecAttr(xml.getVecAttr());
293 const PVecXml & vecXml = xml.getVecChild();
294 for(PVecXml::const_iterator it(vecXml.begin()); it != vecXml.end(); ++it){
295 if(it->getName() != childName){
296 out.getVecChild().push_back(*it);
297 }
298 }
299 return out;
300}
Class used to parse xml.
Definition PXml.h:54
void setVecAttr(const std ::vector< PXmlAttr > &vecAttr)
Set the variable p_vecAttr, of type 'std ::vector<PXmlAttr>'.
Definition PXml.cpp:180
void setValue(const PString &value)
Set the variable p_value, of type 'PString'.
Definition PXml.cpp:166
void setName(const PString &name)
Set the variable p_name, of type 'PString'.
Definition PXml.cpp:152
std::vector< PXml > PVecXml
Vector of PXml.
Definition pxml_utils.h:14

References PXml::getName(), PXml::getValue(), PXml::getVecAttr(), PXml::getVecChild(), PXml::setName(), PXml::setValue(), and PXml::setVecAttr().

+ Here is the call graph for this function:

◆ pxml_getAttrIfExist()

bool pxml_getAttrIfExist ( PXmlAttr & attr,
const PXml & xml,
const PString & attrName )

Get the attribute with given name if exist.

Parameters
[out]attr: vector of matched child
xml: xml input
attrName: name of the searched child
Returns
true if the attribute exists, false otherwise

Definition at line 251 of file pxml_utils.cpp.

251 {
252 bool isSearched(true);
253 const PVecXmlAttr & vecAttr = xml.getVecAttr();
254 PVecXmlAttr::const_iterator it(vecAttr.begin());
255 while(it != vecAttr.end() && isSearched){
256 if(it->getName() == attrName){
257 attr = *it;
258 isSearched = false;
259 }
260 ++it;
261 }
262 return !isSearched;
263}
std::vector< PXmlAttr > PVecXmlAttr
Vector of PXml.
Definition pxml_utils.h:16

References PXml::getVecAttr().

Referenced by loadParserSeq().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_getChildIfExist()

bool pxml_getChildIfExist ( PXml & match,
const PXml & xml,
const PString & childName )

Get the child with given name if exist.

Parameters
[out]match: matched child
xml: xml input
childName: name of the searched child
Returns
true if the child exist, false otherwise

Definition at line 215 of file pxml_utils.cpp.

215 {
216 bool isSearched(true);
217 const PVecXml & vecChild = xml.getVecChild();
218 PVecXml::const_iterator it(vecChild.begin());
219 while(it != vecChild.end() && isSearched){
220 if(it->getName() == childName){
221 match = *it;
222 isSearched = false;
223 }
224 ++it;
225 }
226 return !isSearched;
227}

References PXml::getVecChild().

+ Here is the call graph for this function:

◆ pxml_getChildPtr()

PXml * pxml_getChildPtr ( PXml & xml,
const PString & childName )

Get the child with given name if exist.

Parameters
xml: xml input
childName: name of the searched child
Returns
pointer to the existing child, NULL otherwise

Definition at line 234 of file pxml_utils.cpp.

234 {
235 PXml * out = NULL;
236 PVecXml & vecChild = xml.getVecChild();
237 for(PVecXml::iterator it(vecChild.begin()); it != vecChild.end() && out == NULL; ++it){
238 if(it->getName() == childName){
239 out = &(*it);
240 }
241 }
242 return out;
243}

References PXml::getVecChild().

+ Here is the call graph for this function:

◆ pxml_getFullContent()

PString pxml_getFullContent ( const PXml & xml)

Get the content of the PXml (children or value)

Parameters
xml: PXml to be used
Returns
content of the PXml (children or value)

Definition at line 395 of file pxml_utils.cpp.

395 {
396 const PVecXml & vecXml = xml.getVecChild();
397 if(vecXml.size() != 0lu){
398 return pxml_vecXmlStr(vecXml);
399 }else{
400 return xml.getValue();
401 }
402}

References PXml::getValue(), PXml::getVecChild(), and pxml_vecXmlStr().

Referenced by loadParserSeq().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_getVecChildIfExist()

bool pxml_getVecChildIfExist ( PVecXml & vecMatch,
const PXml & xml,
const PString & childName )

Get the vector of childs with given name if exist.

Parameters
[out]vecMatch: vector of matched childs
xml: xml input
childName: name of the searched childs
Returns
true if the childs exist, false otherwise

Definition at line 197 of file pxml_utils.cpp.

197 {
198 bool isFound(false);
199 const PVecXml & vecChild = xml.getVecChild();
200 for(PVecXml::const_iterator it(vecChild.begin()); it != vecChild.end(); ++it){
201 if(it->getName() == childName){
202 vecMatch.push_back(*it);
203 isFound = true;
204 }
205 }
206 return isFound;
207}

References PXml::getVecChild().

Referenced by loadParserSeq().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_isAttributeEnd()

bool pxml_isAttributeEnd ( PXml & parent,
PFileParser & parser )

Say if it is the end of the attribute definition of the current balise.

Parameters
[out]parent: xml parent in wich to set the isCompact attribute
[out]parser: parser to be used
Returns
true if the attribute end is reached, false if not

Definition at line 62 of file pxml_utils.cpp.

62 {
63 if(parser.isMatch("/>")){
64 parent.setIsCompact(true);
65 return true;
66 }else if(parser.isMatch(">")){
67 parent.setIsCompact(false);
68 return true;
69 }else{
70 return false;
71 }
72}
void setIsCompact(bool isCompact)
Set the variable p_isCompact, of type 'bool'.
Definition PXml.cpp:159

References PXml::setIsCompact().

Referenced by pxml_parserXmlAttribute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_parserContent()

bool pxml_parserContent ( PXml & xml,
const PString & fileContent,
bool isSvg )

Parse a PXml with a file content.

Parameters
[out]xml: PXml to be initialised
fileContent: file content
isSvg: true if the parsed file is a svg
Returns
true on success, false otherwise

Definition at line 48 of file pxml_utils.cpp.

48 {
49 PFileParser parser(pxml_setXmlParser(fileContent, isSvg));
50 xml.setName("root");
51
52 return pxml_parserXmlContent(xml, parser, true);
53
54// return pxml_parserVecXml(xml.getVecChild(), parser, isSvg);
55}
PFileParser pxml_setXmlParser(const PString &fileContent, bool isSvg)
Set the PFileParser for xml.
bool pxml_parserXmlContent(PXml &parent, PFileParser &parser, bool isMainBalise)
Parse the content of an xml balise.

References pxml_parserXmlContent(), pxml_setXmlParser(), and PXml::setName().

Referenced by pxml_parserFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_parserFile()

bool pxml_parserFile ( PXml & xml,
const PPath & fileName,
bool isSvg )

Parse a PXml with a file.

Parameters
[out]xml: PXml to be initialised
fileName: name of the intialisation file
isSvg: true if the parsed file is a svg
Returns
true on success, false otherwise

Definition at line 38 of file pxml_utils.cpp.

38 {
39 return pxml_parserContent(xml, fileName.loadFileContent(), isSvg);
40}
bool pxml_parserContent(PXml &xml, const PString &fileContent, bool isSvg)
Parse a PXml with a file content.

References pxml_parserContent().

+ Here is the call graph for this function:

◆ pxml_parserXmlAttribute()

bool pxml_parserXmlAttribute ( PXml & parent,
PFileParser & parser )

Parse the attribute of a xml balise.

Parameters
[out]parent: xml parent in wich to put the attribute
[out]parser: parser to be used
Returns
true on success, false otherwise

Definition at line 79 of file pxml_utils.cpp.

79 {
80 parser.setWhiteSpace(" \t\n");
81 while(!pxml_isAttributeEnd(parent, parser) && !parser.isEndOfFile()){
82 PString attributeName(parser.getStrComposedOf(ALLOWED_ATTRIBUTE_CHAR));
83 if(attributeName == ""){
84 std::cerr << "pxml_parserXmlAttribute : error at : " << parser.getLocation() << std::endl;
85 std::cerr << "\tcannot parse the attributes name as '"<<parser.getNextToken()<<"'" << std::endl;
86 return false;
87 }
88 if(!parser.isMatch("=")){
89 std::cerr << "pxml_parserXmlAttribute : error at : " << parser.getLocation() << std::endl;
90 std::cerr << "\texpected '=' after attribute '"<<attributeName<<"'" << std::endl;
91 return false;
92 }
93 if(!parser.isMatch("\"")){
94 std::cerr << "pxml_parserXmlAttribute : error at : " << parser.getLocation() << std::endl;
95 std::cerr << "\texpected '\"' after attribute '"<<attributeName<<"='" << std::endl;
96 return false;
97 }
98 PString attributeValue(parser.getUntilKeyWithoutPatern("\""));
99 PXmlAttr tmpAttribute;
100 tmpAttribute.setName(attributeName);
101 tmpAttribute.setValue(attributeValue);
102 parent.getVecAttr().push_back(tmpAttribute);
103 }
104 parser.setWhiteSpace("");
105 return true;
106}
Attribute from xml.
Definition PXml.h:30
void setName(const PString &name)
Set the variable p_name, of type 'PString'.
Definition PXml.cpp:54
void setValue(const PString &value)
Set the variable p_value, of type 'PString'.
Definition PXml.cpp:61
bool pxml_isAttributeEnd(PXml &parent, PFileParser &parser)
Say if it is the end of the attribute definition of the current balise.
#define ALLOWED_ATTRIBUTE_CHAR
List of allowed char as attribute name.

References ALLOWED_ATTRIBUTE_CHAR, PXml::getVecAttr(), pxml_isAttributeEnd(), PXmlAttr::setName(), and PXmlAttr::setValue().

Referenced by pxml_parserXmlContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_parserXmlContent()

bool pxml_parserXmlContent ( PXml & parent,
PFileParser & parser,
bool isMainBalise )

Parse the content of an xml balise.

Parameters
[out]parent: xml parent in wich to put the content
[out]parser: parser to be used
isMainBalise: true if the parent balise if the main one, false otherwise
Returns
true on success, false otherwise

Definition at line 115 of file pxml_utils.cpp.

115 {
116 parser.setSeparator("<>\"=");
117 parser.setWhiteSpace("");
118 PString balisePartialEnd("/" + parent.getName() + ">");
119 PString baliseEnd("<" + balisePartialEnd);
120 PXml text;
121 text.setIsText(true);
122 while(!parser.isMatch(baliseEnd) && !parser.isEndOfFile()){
123 PString textString(parser.getUntilKeyWithoutPatern("<"));
124 if(textString != ""){ //If the next token is not a < it is a text
125 text.getValue() += textString;
126 if(parent.getVecChild().size() == 0lu){
127 if(parser.isMatch(balisePartialEnd)){
128 parent.setValue(text.getValue());
129 return true;
130 }else{
131 parent.getVecChild().push_back(text);
132 }
133 }else{
134 parent.getVecChild().push_back(text);
135 }
136 text.setValue(""); //Reset value for next one
137 }
138 if(parser.isEndOfFile()){
139 if(isMainBalise){
140 return true;
141 }else{
142 std::cerr << "pxml_parserXmlContent : error at : " << parser.getLocation() << std::endl;
143 std::cerr << "\tunexpected end of file. We are supposed to be in the balise '"<<parent.getName()<<"'" << std::endl;
144 return false;
145 }
146 }
147 if(parser.isMatch(balisePartialEnd)){ //We find the end of the balise
148 return true;
149 }else{ //Or it can be another balise
150 PString childBaliseName(parser.getStrComposedOf(ALLOWED_BALISE_CHAR));
151 if(childBaliseName != ""){ //We find a new balise
152 PXml xml;
153 xml.setName(childBaliseName);
154 if(childBaliseName == "!--"){
155 parser.getUntilKeyWithoutPatern("-->"); //Skip the comment
156 }else if(childBaliseName == "?xml"){
157 parser.getUntilKeyWithoutPatern("?>"); //Skip the svg balise
158 }else{
159 if(!pxml_parserXmlAttribute(xml, parser)){ //Let's parse the attribute
160 std::cerr << "pxml_parserXmlContent : error at : " << parser.getLocation() << std::endl;
161 std::cerr << "\tcannot parse the attributes of balise '"<<childBaliseName<<"'" << std::endl;
162 return false;
163 }
164 if(!xml.getIsCompact()){
165 //Let's parse the content
166 if(!pxml_parserXmlContent(xml, parser, false)){
167 std::cerr << "pxml_parserXmlContent : error at : " << parser.getLocation() << std::endl;
168 std::cerr << "\tcannot parse balise '"<<childBaliseName<<"'" << std::endl;
169 return false;
170 }
171 }
172 parent.getVecChild().push_back(xml);
173 }
174 }else if(parser.isMatch("/")){
175 std::cerr << "pxml_parserXmlContent : in balise '"<<parent.getName()<<"' unexpected '</' at : " << parser.getLocation() << std::endl;
176 return false;
177 }else{ //It was just a text <
178 text.getValue() += "<";
179 }
180 }
181 }
182 return true;
183}
void setIsText(bool isText)
Set the variable p_isText, of type 'bool'.
Definition PXml.cpp:173
bool pxml_parserXmlAttribute(PXml &parent, PFileParser &parser)
Parse the attribute of a xml balise.
#define ALLOWED_BALISE_CHAR
List of allowed char as balise name.
Definition pxml_utils.cpp:8

References ALLOWED_BALISE_CHAR, PXml::getIsCompact(), PXml::getName(), PXml::getValue(), PXml::getVecChild(), pxml_parserXmlAttribute(), pxml_parserXmlContent(), PXml::setIsText(), PXml::setName(), and PXml::setValue().

Referenced by pxml_parserContent(), and pxml_parserXmlContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_saveFile()

bool pxml_saveFile ( const PPath & fileName,
const PXml & xml,
bool isSvg )

Save a xml in a file.

Parameters
fileName: name of the output file
xml: xml to be saved
isSvg: say if the output xml has to be SVG like (with no space between chevron and newline between attribute
Returns
true on success, false otherwise

Definition at line 308 of file pxml_utils.cpp.

308 {
309 PString body(pxml_baliseStr(xml, isSvg));
310 return fileName.saveFileContent(body);
311}
PString pxml_baliseStr(const PXml &xml, bool isSvg)
Convert xml in string.

References pxml_baliseStr().

+ Here is the call graph for this function:

◆ pxml_setAttr()

void pxml_setAttr ( PXml & xml,
const PString & nameAttr,
const PString & valueAttr )

Set a value to an attribute.

Parameters
[out]xml: xml to be modified
nameAttr: name of the attribute
valueAttr: value of the attribute

Definition at line 270 of file pxml_utils.cpp.

270 {
271 bool isSearched(true);
272 PVecXmlAttr & vecAttr = xml.getVecAttr();
273 PVecXmlAttr::iterator it(vecAttr.begin());
274 while(it != vecAttr.end() && isSearched){
275 if(it->getName() == nameAttr){
276 it->setValue(valueAttr);
277 isSearched = false;
278 }
279 ++it;
280 }
281}

References PXml::getVecAttr().

+ Here is the call graph for this function:

◆ pxml_setXmlParser()

PFileParser pxml_setXmlParser ( const PString & fileContent,
bool isSvg )

Set the PFileParser for xml.

Parameters
fileContent: content to be parsed
isSvg: true if the parsed file is a svg
Returns
PFileParser

Definition at line 20 of file pxml_utils.cpp.

20 {
21 PFileParser parser;
22 parser.setSeparator("<>\"=");
23 if(isSvg){
24 parser.setWhiteSpace("");
25 }else{
26 parser.setWhiteSpace("\t\n ");
27 }
28 parser.setFileContent(fileContent);
29 return parser;
30}

Referenced by pxml_parserContent().

+ Here is the caller graph for this function:

◆ pxml_vecAttrStr()

PString pxml_vecAttrStr ( const PVecXmlAttr & vecXmlAttr,
bool isSvg )

Convert attributes in string.

Parameters
vecXmlAttr: xml attributes to be converted into string
isSvg: say if the output xml has to be SVG like (with no space between chevron and newline between attribute
Returns
output string

Definition at line 382 of file pxml_utils.cpp.

382 {
383 if(vecXmlAttr.size() == 0lu){return "";}
384 PString body("");
385 for(PVecXmlAttr::const_iterator it(vecXmlAttr.begin()); it != vecXmlAttr.end(); ++it){
386 body += pxml_attrStr(*it, isSvg);
387 }
388 return body;
389}
PString pxml_attrStr(const PXmlAttr &xmlAttr, bool isSvg)
Convert attribute in string.

References pxml_attrStr().

Referenced by pxml_baliseStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pxml_vecXmlStr()

PString pxml_vecXmlStr ( const PVecXml & vecXml,
bool isSvg )

Convert a vecto of xml in string.

Parameters
vecXml: vecor of xml to be converted into string
isSvg: say if the output xml has to be SVG like (with no space between chevron and newline between attribute
Returns
output string

Definition at line 355 of file pxml_utils.cpp.

355 {
356 PString body("");
357 for(PVecXml::const_iterator it(vecXml.begin()); it != vecXml.end(); ++it){
358 body += pxml_baliseStr(*it, isSvg);
359 }
360 return body;
361}

References pxml_baliseStr().

Referenced by pxml_baliseStr(), and pxml_getFullContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: