7 #ifndef __PXML_UTILS_H__
8 #define __PXML_UTILS_H__
classe qui permet de parser des fichiers texte en renvoyant les tokens les uns après les autres
Path of a directory or a file.
bool pxml_parserXmlContent(PXml &parent, PFileParser &parser, bool isMainBalise=false)
Parse the content of an xml balise.
PString pxml_attrStr(const PXmlAttr &xmlAttr, bool isSvg=false)
Convert attribute in string.
bool pxml_getVecChildIfExist(PVecXml &vecMatch, const PXml &xml, const PString &childName)
Get the vector of childs with given name if exist.
PXml pxml_eraseVecChild(const PXml &xml, const PString &childName)
Erase the childs of the current xml if it has childName as name.
PFileParser pxml_setXmlParser(const PString &fileContent, bool isSvg=false)
Set the PFileParser for xml.
bool pxml_saveFile(const PPath &fileName, const PXml &xml, bool isSvg=false)
Save a xml in a file.
bool pxml_getAttrIfExist(PXmlAttr &attr, const PXml &xml, const PString &attrName)
Get the attribute with given name if exist.
bool pxml_parserContent(PXml &xml, const PString &fileContent, bool isSvg=false)
Parse a PXml with a file content.
PString pxml_vecAttrStr(const PVecXmlAttr &vecXmlAttr, bool isSvg)
Convert attributes in string.
bool pxml_parserXmlAttribute(PXml &parent, PFileParser &parser)
Parse the attribute of a xml balise.
std::vector< PXmlAttr > PVecXmlAttr
Vector of PXml.
void pxml_setAttr(PXml &xml, const PString &nameAttr, const PString &valueAttr)
Set a value to an attribute.
PString pxml_getFullContent(const PXml &xml)
Get the content of the PXml (children or value)
PString pxml_vecXmlStr(const PVecXml &vecXml, bool isSvg=false)
Convert a vecto of xml in string.
bool pxml_getChildIfExist(PXml &match, const PXml &xml, const PString &childName)
Get the child with given name if exist.
PXml * pxml_getChildPtr(PXml &xml, const PString &childName)
Get the child with given name if exist.
bool pxml_parserFile(PXml &xml, const PPath &fileName, bool isSvg=false)
Parse a PXml with a file.
std::vector< PXml > PVecXml
Vector of PXml.
PString pxml_baliseStr(const PXml &xml, bool isSvg=false)
Convert xml in string.