This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

create xml from xml schema in java  RSS feed

 
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

if can i create a xml document framework from xml schema in java, then i can fill the fields by DOM?

Thanks
 
Sheriff
Posts: 23889
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, that depends on what you mean by "framework".
 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in fact, i have the data in csv format from other system, and we need to write a app to transform it to xml format, i have the xml schemas for several formats, what we need to do is just to define some mapping machanism to implement the transformation programmably.
so i think first we need a program to create a empty xml file(have the well formed structure, but have not data) following the defination of the xml schema, then define the mappings to fill the empty xml file. but i find it is hard to find a mechanism to generate xml file from its schema by java.

can you help to this case?
thnaks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that a schema probably does NOT define a unique XML document - many structures can be legal. For example with repeating elements.

This toolkit has some examples of various flat file to XML conversions.

Bill
 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. it looks helpful. let me try
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!