Results 1 to 4 of 4
  1. #1
    lreenaers is offline Member
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Default Listing available xml element and attribute from an xsd

    Hi All,

    I'd like to know if someone could imagine a way to generate lists of xml element and attribute from an xsd.

    Basically I'd like to allow user to mannually associate csv collumn to xml element / attribute. so I need to provide user with syntax like this: "root.Element.attribute.value = column value"

    users telle me where xsd is and I provide him with a list of "root.element.attribute.value" or "root.element.value" compliant with the xsd.

    I hope I'm clear,

    thanks.

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    364
    Rep Power
    5

    Default

    I guess you are no so clear :)

    But I'm willing to help for sure :)

    Maybe a simple approach would be to use this JSefa API:

    JSefa - Quick Tutorial

    and annotate the same class with XML and CSV annotations at the same time. This way you put java objects in center of your app logic so you can do what ever you want with them later.

    I'd like to know if someone could imagine a way to generate lists of xml element and attribute from an xsd.
    Are you trying to develop code to generate xmlfiles confirming to the xsd?

    I'd like to allow user to mannually associate csv collumn to xml element / attribute.
    Please explain this in details. Is user using GUI? Is user using both CSV and XML files that comes ready for use....

    cheers!

  3. #3
    lreenaers is offline Member
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Default

    Reading my post I realize that I wasn't so clear :)
    Please apologize me for that, I'm not natively speaking english sorry :)

    So ! I'll try to explain better.
    -My users Have various source of data, that can be exported to csv files;
    -Users would like to provide a system with xml files that represent data contained in csv;
    -Since all sources of data have different formats, I'm currently writting a java solution (Swing GUI);
    -this solution will allow users to map csv collumns to xml elements / attributes and then generate xml files from previously made mappings;
    - unfortunately, it is a bit more complicated since xml may be from different format (xsd);

    So, user will inputs the location of the xsd. from wich schema(xsd) I'd like to extract elements and attributes. for example, user will map (based on combobox and textfield) data like this:

    collumn "author"(from csv) -mapped with- "root.book.author" (this element is described in xsd and will be present into xml file)

    then I'll generate xml from csv data and user mappings.

    Hope its more clear now :)

    thanks for your help

  4. #4
    lreenaers is offline Member
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Default

    I'm currently testing JSFa, wich could do the trick using java introspection. But I'm facing issues to add some additional : "xsi:schemaLocation" ... it does not seems to be possible to add prefix to attributes.

Similar Threads

  1. Listing the alphabet (beginner)
    By SuperOnion in forum New To Java
    Replies: 3
    Last Post: 12-22-2008, 03:23 AM
  2. Listing Logical Drives
    By Juggler in forum New To Java
    Replies: 3
    Last Post: 08-10-2008, 07:08 AM
  3. Listing all threads and threadgroups in the VM
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-09-2008, 06:36 PM
  4. Listing tables of a database
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-12-2008, 09:30 AM
  5. Listing all available Locales
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-29-2007, 04:54 PM

Tags for this Thread

Posting Permissions

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