- attached cmake-3.2.3_Test.xml
- attached cmake-3.3.1_Test.xml
CMake 3.3.1 XML output fails to parse
I just observed that if the current version of the plugin is fed CMake 3.3.1 XML it fails to parse. With CMake 3.2.3 XML, it seems to parse just fine.
I will have a look at the differences of the XML and report back.
Comments (10)
-
reporter -
Looks like the 3.3.1 do not encode quotes anymore... I will look into it
-
It seems that a bug was introduced with the replacement of direct use of cmXMLSafe and std::ostream in favor of cmXMLwriter. cmXMLWriter is wrongly outputing Safe content without (quotes, etc.) escaping.
I posted this patch to the CMake-developers mailing list to have pre-3.3 area behavior :
index c38c0de..7b71bae 100644 --- a/Source/cmXMLWriter.h +++ b/Source/cmXMLWriter.h @@ -94,12 +94,12 @@ private: static cmXMLSafe SafeContent(const char* value) { - return cmXMLSafe(value).Quotes(false); + return cmXMLSafe(value); } static cmXMLSafe SafeContent(std::string const& value) { - return cmXMLSafe(value).Quotes(false); + return cmXMLSafe(value); } template <typename T>
-
- changed status to on hold
I'm putting the issue on-hold till I get an answer from CMake developers. If they don't act on it then I would need to change my code, maybe that the XSL approach recommended in
#2 -
reporter Agree with the approach, we'll manage with CMake 3.2 for now, but it's best to keep up with their new versions as they come along.
-
- changed status to open
OK, got a response that quotes in content is valid XML (they were escaped before...). I need to find which part of the parsing packages needs updating or configuring
-
- changed status to resolved
fixes
#3→ <<cset aae8a5e9feb7>>
-
reporter Beautiful, looks like the right way to fix it. Thanks @marache!
-
Issue
#2was marked as a duplicate of this issue. -
great to see this fixed!
- Log in to comment
Two example XML files attached. The differences seem quite minor.