Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Problem reading an xml file using java

Problem reading an xml file using java

Scheduled Pinned Locked Moved Java
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    snouto
    wrote on last edited by
    #1

    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</

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups