Re: XML Parser in EVC++ 4.0



Hi John,

The exceptions we were seeing were actually reported to us by a
customer. After a site survey the data being returned by an internal
XML page contained invalid characters from the SSID names--e.g.,
"<MY_AP!>". While we were able to code a work-around on our homebrew
parser, the customer, who was using the MSXML parser, would see a
general exception. Unfortunately, I never saw any of the error logs or
specifics, so I can't give you any more details than that.

-Dan.


John Spaith [MS] wrote:
Dan, could you please let me know where XML can bomb on invalid XML or what
you mean by that? Do you mean that it just fails to keep parsing the data
(in which case that's what it should be doing :)) or do you mean it crashes
on you (and not just the spurios messages about it throwing exceptions
(http://www.pocketpcdn.com/articles/xmlfaq.html or the bug in EVC where EVC
hangs (http://blogs.msdn.com/cenet/archive/2005/07/27/444077.aspx) when
MSXML hits an error, which wouldn't affect retail devices). If it is
something I'm not aware of I would like to know so we can address this.

If you really want to be able to parse any garbage XML thrown at you (or as
far as you can), you could try using SAX. It will keep parsing and caller
your sax handler till it hits the error (in which case it too will stop its
parsing).

--
John Spaith
Development Lead, Windows CE
Microsoft Corporation

Check out the CE Networking Team Blog at http://blogs.msdn.com/cenet/.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2006 Microsoft Corporation. All rights
reserved.

"Dan McCarty" <dmccarty@xxxxxxxxx> wrote in message
news:1163627484.679685.135650@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The MSXML parser can also bomb on invalid XML (e.g., special characters
not escaped), whereas if you have the source to your own parser you can
compensate with invalid parsing. ;-)

Dan, speaking from experience, unfortunately.

.



Relevant Pages

  • Some questions about handling exceptions and when to throw them
    ... still confused as to just what the best practices are for using exceptions. ... In the event that a customer can't be ... "FirmwareService" and it is responsible for adding new versions of firmware ... This function is similiar to GetEmployeeDefaultPrinter() in that it makes a ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Some questions about handling exceptions and when to throw them
    ... you should not be using exceptions for Logic in your code. ... finding a customer is by no means an illegal use of a class. ... This function is similiar to GetEmployeeDefaultPrinter() in that it makes ... // Presenter method to get a customer's firmware path and display in the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Constellations
    ... You want a set of dirs, with exceptions, and exceptions to the ... only XML. ... expressed using XML or that expressing the list using a combination of ...
    (comp.lang.java.programmer)
  • Re: Print the exceptions of a Standard Calendar with descriptions.
    ... "JulieS" wrote: ... Yes, saving it as an XML does show the names of the exceptions, ... does not print the descriptions of the other non-working days I ...
    (microsoft.public.project)
  • Re: Constellations
    ... You want a set of dirs, with exceptions, and exceptions to the ... only XML. ... expressed using XML or that expressing the list using a combination of ...
    (comp.lang.java.programmer)