Added support for trimming the contents of parsed Xml graph

This commit is contained in:
Robert Osfield
2009-08-19 15:36:23 +00:00
parent f3c20310d6
commit 850ea3de9f
3 changed files with 49 additions and 21 deletions

View File

@@ -33,6 +33,8 @@ inline XmlNode* readXmlFile(const std::string& filename)
/** read an Xml from from an istream.*/
extern OSGDB_EXPORT XmlNode* readXmlStream(std::istream& fin);
extern OSGDB_EXPORT std::string trimEnclosingSpaces(const std::string& str);
/** XmlNode class for very basic reading and writing of xml files.*/
class OSGDB_EXPORT XmlNode : public osg::Referenced
{
@@ -60,6 +62,8 @@ class OSGDB_EXPORT XmlNode : public osg::Referenced
Properties properties;
Children children;
std::string getTrimmedContents() const { return trimEnclosingSpaces(contents); }
public:
class OSGDB_EXPORT Input