This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Alvaro San Millan
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • 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
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic