|
2002 |
std::ostringstream oss; |
2002 |
std::ostringstream oss; |
2003 |
oss << std::setprecision (10); |
2003 |
oss << std::setprecision (10); |
2004 |
oss << value; |
2004 |
oss << value; |
|
|
2005 |
const char *attribute_char = oss.str().c_str(); |
2005 |
m_elementString += attribute.c_str (); |
2006 |
m_elementString += attribute.c_str (); |
2006 |
m_elementString += "=\"" + oss.str () + "\" "; |
2007 |
m_elementString += "=\""; |
|
|
2008 |
while (*attribute_char) |
2009 |
{ |
2010 |
switch(*attribute_char) |
2011 |
{ |
2012 |
case '&': |
2013 |
m_elementString += "&"; |
2014 |
break; |
2015 |
case '\"': |
2016 |
m_elementString += """; |
2017 |
break; |
2018 |
case '\'': |
2019 |
m_elementString += "'"; |
2020 |
break; |
2021 |
case '<': |
2022 |
m_elementString += "<"; |
2023 |
break; |
2024 |
case '>': |
2025 |
m_elementString += ">"; |
2026 |
break; |
2027 |
default: |
2028 |
m_elementString += *attribute_char; |
2029 |
break; |
2030 |
} |
2031 |
attribute_char++; |
2032 |
} |
2033 |
m_elementString += "\" "; |
2007 |
} |
2034 |
} |
2008 |
|
2035 |
|
2009 |
void |
2036 |
void |