Re: XML Parser in EVC++ 4.0
- From: stefano_mi74@xxxxxxxx
- Date: 28 Nov 2006 05:17:47 -0800
Excuse me can you give me some example for read my file XML with SAX
parser in EVC++ ?
My file :
<?xml version="1.0" standalone="yes"?>
<Impianti>
<Impianto Impianto_Id="1">
<Nome>Impianto 1</Nome>
<Avaria Impianto_Id="1" Identificativo="1">
<Descrizione>Descrizione 1</Descrizione>
<Guida>Guida 1</Guida>
</Avaria>
<Avaria Impianto_Id="1" Identificativo="2">
<Descrizione>Descrizione 2</Descrizione>
<Guida>Guida 2</Guida>
</Avaria>
</Impianto>
<Impianto Impianto_Id="2">
<Nome>Impianto 2</Nome>
<Avaria Impianto_Id="2" Identificativo="1">
<Descrizione>Descrizione 1</Descrizione>
<Guida>Guida 1</Guida>
</Avaria>
<Avaria Impianto_Id="2" Identificativo="2">
<Descrizione>Descrizione 2</Descrizione>
<Guida>Guida 2</Guida>
</Avaria>
</Impianto>
</Impianti>
Dan McCarty ha scritto:
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.
.
- Next by Date: Re: close modal dialog from view class??
- Next by thread: Re: close modal dialog from view class??
- Index(es):
Relevant Pages
|
Loading