Hello all!
First Let me say that my knowledge of XML is not extensive.
But I know the basic idea.
My problem is this:
I have a Java program that acts as an e mail client and when
I download messages I create an XML file which stores data such as the Subject the FROM and the file which is created from the content.(text, html, jpg etcetera.)
When I want to display the message I parse the xml and display
the data.
This works fine unless the Subject contains a character such as an "e" with an acute accent or umlaut.Then the parser crashes and my data is lost.I get an Invalid UTF 8 encoding error.
My XML has something like this:
Can someone point me in the right direction with this?
Any help would be appreciated.
-gullyman
First Let me say that my knowledge of XML is not extensive.
But I know the basic idea.
My problem is this:
I have a Java program that acts as an e mail client and when
I download messages I create an XML file which stores data such as the Subject the FROM and the file which is created from the content.(text, html, jpg etcetera.)
When I want to display the message I parse the xml and display
the data.
This works fine unless the Subject contains a character such as an "e" with an acute accent or umlaut.Then the parser crashes and my data is lost.I get an Invalid UTF 8 encoding error.
My XML has something like this:
Code:
<?xml version= '1.0'?>
<!DOCTYPE VIEWS [
<!ELEMENT VIEWS (VIEW)*>
<!ELEMENT VIEW ( NAME, ITEM, TYPE, TARGET, APP)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT ITEM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<!ELEMENT TARGET (#PCDATA)>
<!ELEMENT APP (#PCDATA)>
]>
<VIEWS>
<VIEW>
<NAME>Incoming View</NAME>
<ITEM>FROM_customerserviceonline@pgecomMessage_Sent_Jan_26_2008_94620_PM_Part_1</ITEM>
<TYPE>EmailSUBJECT_PGE_You_Have_a_New_Energy_Statement</TYPE>
<TARGET>C:/ProDev/ProDev/in/FROM_customerserviceonline@pgecomMessage_Sent_Jan_26_2008_94620_PM_Part_1.html</TARGET>
<APP>ShowMessage</APP>
</VIEW>
</VIEWS>
Any help would be appreciated.
-gullyman