• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Load Employee data from text file and convert it to XML and JSON

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

I have to load information from an Employee contained in a text file (one field per line), and convert it to a XML or JSON representation MATCHING a schema provided. And this last part it's what I am not sure. I know to load the data, and convert it to XML and also to convert from XML to JSON using XSLT, but how about to matching the schema?

Thanks in advance
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Depending upon the complexity and size of the XML Schema, this can be relatively very easy or very difficult. You first should analyze the XML Schema and the requirements for the actual XML document that you need to create. Once you cleary understand the XML document structure that is required, you then would check to see if it is valid according to the provided XML Schema. If it is, then you are ready to write code.

When you write the code to create the XML document, you need to write the code to produce the XML document correctly, i.e. a valid XML document that will conform to the rules in the XML Schema. The one check that you should implement is once [the code] has created the document, [the code] should validate against the XML schema to ensure that the document is valid and has been created correctly.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic