From 845d33b353c3595b665fd77f47d2696b684ef8b6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 20 Sep 2011 10:01:07 +0000 Subject: [PATCH] Added handling of tag and "" options. --- src/osgDB/XmlParser.cpp | 48 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/src/osgDB/XmlParser.cpp b/src/osgDB/XmlParser.cpp index 9513ae976..1f64b4624 100644 --- a/src/osgDB/XmlParser.cpp +++ b/src/osgDB/XmlParser.cpp @@ -197,6 +197,26 @@ bool XmlNode::read(Input& input) return true; } + else if (input.match("type = XmlNode::INFORMATION; + children.push_back(commentNode); + + ++input; + XmlNode::Input::size_type end = input.find(">"); + commentNode->contents = input.substr(0, end); + if (end!=std::string::npos) + { + OSG_INFO<<"Valid infomation record ["<contents<<"]"<contents<<"]"<=0 && c!='>' && c!='/' && c!='"' && c!='\'' && c!='=' && c!=' ') + + if (input[0]=='"') { - option.push_back(c); + option.push_back(input[0]); + ++input; + while((c=input[0])>=0 && c!='"') + { + if (c=='&') + readAndReplaceControl(option, input); + else + { + option.push_back(c); + ++input; + } + } + option.push_back(input[0]); ++input; } + else + { + while((c=input[0])>=0 && c!='>' && c!='/' && c!='"' && c!='\'' && c!='=' && c!=' ') + { + option.push_back(c); + ++input; + } + } + input.skipWhiteSpace(); if (input[0]=='=') { @@ -296,7 +338,7 @@ bool XmlNode::read(Input& input) if (prev_pos == input.currentPosition()) { - OSG_NOTICE<<"Error, parser iterator note advanced, position: "<