-The following example uses the libxml XML parser to parse a string xmlSrc.
+The following example uses the Xerces-C++ XML parser to parse a string data.
If that string is from an untrusted source, this code may be vulnerable to an XXE attack, since
-the parser is invoked with the noent option set to true:
+the parser is constructed in its default state with setDisableDefaultEntityResolution
+set to false:
-To guard against XXE attacks, the noent option should be omitted or set to
-false. This means that no entity expansion is undertaken at all, not even for standard
-internal entities such as & or >. If desired, these
-entities can be expanded in a separate step using utility functions provided by libraries such
-as underscore,
-lodash or
-he.
+To guard against XXE attacks, the setDisableDefaultEntityResolution option should be
+set to true.