Results 1 to 3 of 3

Thread: Java and xml

  1. #1
    tridip is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Java and xml

    i have to prepare a java program that will read datas from a file. The file will contain data in a single line(eg:XyzLondonEngineer).But this file will be read by the java progm only through an 'xml' file that will tell about the format of the data stored in d file(i.e:the first 3 chars will be the name,the next 5 ll be place and d rest will be designation).Later on these datas have to be stored in a datatbase.

    Plz help.How to start.:confused:

  2. #2
    jasonwucinski is offline Member
    Join Date
    Feb 2011
    Posts
    64
    Rep Power
    0

    Default

    what have you done so far? although I'm new to java, i do program in other languages. If I were doing this project, I would look at using an XSD scheme file to first validate the XML file that's coming in. Once the file has been validated, then you can assume that all the elements in the XML file are in the right order, etc. This can probably all be done with an XML parser. Once the data is parsed, you should be able to easily add it to a db. look at this, I havent thoroughly reviewed it but it may get you onto the right path:

    Java Technology and XML-Part One

    good luck

  3. #3
    tridip is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Half the job is done!

    Well thanku for ur reply..
    ur suggestions wer d same dat i had followed...
    i did parsing and taking out ol d attributes one by one and den comparing only doz dat i require...n dn its ol simple progming.
    :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •