'System.Xml.XmlException' Exception in system.xml.dll
Extra Information: System Error.
I look at MSDN and this is the only type of exception that LoadXML method
can return. It happens with strings like the next:
"Aplicacion del Razonamiento Semicualitativo al Modelado y Analisis de
Sistemas Econ & o a c u t e ; micos.";
but if i remove the entiy and changes the string to this:
"Aplicacion del Razonamiento Semicualitativo al Modelado y Analisis de
Sistemas Economicos.";
it works. The problem is that this information is about book's titles and i
have to save it and i cann't loose characters. I don't mind loose the written
accent but not the character.
Thanks for the help.
Bye.
[quoted text, click to view] "Oleg Tkachenko [MVP]" wrote:
> Javier wrote:
>
> > I have a problem with encoding. I get information from a web page, and
> > sometimes it contains "strange" symbols like "á" and "é", and these come
> > encoding like "& a a c u t e ;", "& e a c u t e ;" and similar.
> > The problem is that i use this information in XMLDocument object, I load the
> > string than contains all the information in this object with the method
> > .LoadXML(string) and this raises an exception, i think it's because it has a
> > problem with the strange symbols.
>
> Why guess? Show us which exception do you get.
>
>
> --
> Oleg Tkachenko [XML MVP, MCAD]
>
http://www.xmllab.net >
http://blog.tkachenko.com
Hello:
i have a problem with your solution. The information in the XML Files comes
from a web pages, and i don't know all the entities that could appear when i
get automatically the information from the web page. What i know is that all
the entities are HTML entities, perhaps if i could find a DTD for all this
HTML entities, i will solve the problem. But i need it done, i am not going
to do a DTD for all the entities that can appear in a HTML document. Is it
possible?
Thanks for your help.
Bye.
[quoted text, click to view] "Martin Honnen" wrote:
>
>
> Javier wrote:
>
>
> > I have a problem with encoding. I get information from a web page, and
> > sometimes it contains "strange" symbols like "á" and "é", and these come
> > encoding like "& a a c u t e ;", "& e a c u t e ;" and similar.
>
> If your XML uses entity references then the entities referenced need to
> be defined in the DTD (unless you use predefined enitities like lt or gt
> or apos or quot).
> So you need to make sure that you have e.g.
> <?xml version="1.0"?>
> <!DOCTYPE root [
> <!ENTITY aacute "á">
> ]>
> <root>Some text here with a reference: á</root>
>
>
>
>
> --
>
> Martin Honnen --- MVP XML
>
http://JavaScript.FAQTs.com/
Hello:
I have solved it, i add the entities that found in the links you gave me to
my XML file, and it solves the problem.
It has been really hard, because i know almost nothing about XML but now it
works.
Thank you all for your help.
[quoted text, click to view] Javier wrote:
> I have a problem with encoding. I get information from a web page, and
> sometimes it contains "strange" symbols like "á" and "é", and these come
> encoding like "& a a c u t e ;", "& e a c u t e ;" and similar.
> The problem is that i use this information in XMLDocument object, I load the
> string than contains all the information in this object with the method
> .LoadXML(string) and this raises an exception, i think it's because it has a
> problem with the strange symbols.
Why guess? Show us which exception do you get.
--
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
Note that you can copy this file to your hard drive:
http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent Then you can include it into your XML document using the following include
mechanism:
<!DOCTYPE root [
<!ENTITY % isolat1 SYSTEM "xhtml-lat1.ent">
%isolat1;
]>
<root>
...
</root>
This way you can share all these definitions across your XML documents.
[quoted text, click to view] "Javier" <Javier@discussions.microsoft.com> wrote in message
news:B6F13204-5AE8-436F-B214-1F230E36A856@microsoft.com...
> Hello:
> I have solved it, i add the entities that found in the links you gave me
> to
> my XML file, and it solves the problem.
> It has been really hard, because i know almost nothing about XML but now
> it
> works.
> Thank you all for your help.
> Bye.
Don't see what you're looking for? Try a search.