B
Bob Rock
Hello,
always having to validate an XML stream against a XSD may add up an
important overhead. My XMLs are usually the result of serializing a
class instance and often in my applications what I end up doing is
just deserializing it back into a new instance of the same class.
Considering what I just said what I often end up doing is not
validating my XML to be deserialized and just try deserializing it
into an instance of the class and catch proper exceptions handling
them (and eventually doing the validation there to identify the exact
issue at hand).
Now, it this approach good? I mean, are there situations where a XML
that is not conform to an XSD still may get correctly deserialized
into an instance of my class? In other words, are there situations
where an incorrect XML may go undetected by using my approach???
Bob Rock
always having to validate an XML stream against a XSD may add up an
important overhead. My XMLs are usually the result of serializing a
class instance and often in my applications what I end up doing is
just deserializing it back into a new instance of the same class.
Considering what I just said what I often end up doing is not
validating my XML to be deserialized and just try deserializing it
into an instance of the class and catch proper exceptions handling
them (and eventually doing the validation there to identify the exact
issue at hand).
Now, it this approach good? I mean, are there situations where a XML
that is not conform to an XSD still may get correctly deserialized
into an instance of my class? In other words, are there situations
where an incorrect XML may go undetected by using my approach???
Bob Rock