Problem reading an xml file using java
-
i have a Com File which is called through .Net application and i made another java application that call the same COM file using JNI . but the problem is that the xml format generated from the Com file in case of the .Net application is approx 49.9K and the same Xml file Contents generated through java is half the size of the previous file in .net about 24.9K . I had figured out that the .Net application generates the xml file as unicode format while the java application generates the same xml format as ANSI format which is approx the half of the .Net counterpart . but the problem now is that i can't deserialize the java generated xml to convert it into its java object using XMLDecoder because it is ill formed xml whereas its tags are well structured . even when i try to open that .NEt xml file into the IE browser it structures the xml file successfully while the java xml file version tells me that the file is ill formed knowing that the file is well structured and all the tags are valid. here are the two xml files .Net Xml File Version
<?xml version="1.0" encoding="UTF-16"?> <Resume xmlns="http://ns.hr-xml.org" xmlns:rm="resumemirror.com" xmlns:hr="http://ns.hr-xml.org/PersonDescriptors" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="en"> <ResumeId idOwner="Resume Mirror"> <IdValue name="RESUME ID">Veterinary-mohammed.doc</IdValue> </ResumeId> <StructuredXMLResume> <ContactInfo> <PersonName> <FormattedName>Mohamed Ibrahim Mohamed</FormattedName> <GivenName>Mohamed</GivenName> <MiddleName>Ibrahim</MiddleName> <FamilyName>Mohamed</FamilyName> </PersonName> <ContactMethod> <Use>personal</Use> <Telephone> <InternationalCountryCode>20</InternationalCountryCode> <SubscriberNumber>20846902634</SubscriberNumber> </Telephone> <Mobile> <InternationalCountryCode>20</InternationalCountryCode> <SubscriberNumber>20106231078</SubscriberNumber> </Mobile> <InternetEmailAddress>matrix_623@yahoo.com</InternetEmailAddress> <PostalAddress> <CountryCode>EG</CountryCode> <DeliveryAddress> <AddressLine>48 Naser Street Senoris Fayoum</