Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: xml file parsing using xsd file in Java

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default xml file parsing using xsd file in Java

    Hi,
    Our application uses jdk 1.4, weblogic 8.1, Maven 1.0. For one of the new features, we need to have an xml parser to parse an xml file using the given .xsd file. what are the ways to do this task and kindly let me know the appropriate jar file for this and the Maven configuration for the jar file.

    Thanks
    Gowri


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: xml file parsing using xsd file in Java

    I hate to just toss a link at you, but is this what you want: Java-to-Schema Examples (The Java™ Tutorials > Java Architecture for XML Binding (JAXB) > Introduction to JAXB)
    The tutorial uses ant, but in the JAXB release documents, it explains how to use maven (it's a big document, CTRL-F it): https://jaxb.java.net/2.2.7/docs/rel...mentation.html
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  3. #3
    Member
    Join Date
    Jul 2013
    Posts
    219
    Thanks
    0
    Thanked 18 Times in 17 Posts

    Default Re: xml file parsing using xsd file in Java

    Hello.
    You can use JAXB as suggested earlier by someone.
    You can also use JAXP to parse the XML document.
    You can find sample programs by doing google search.

    Syed.

Similar Threads

  1. xsd to Xml
    By krishna in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 10th, 2013, 06:02 AM
  2. Java XML parsing for HUGE size file and no root tags
    By peekuabc in forum Java Theory & Questions
    Replies: 5
    Last Post: June 28th, 2013, 10:53 AM
  3. Code for parsing .c file in java
    By Kakashi in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: March 6th, 2013, 12:51 AM
  4. [SOLVED] Parsing a text file in java
    By tccool in forum What's Wrong With My Code?
    Replies: 13
    Last Post: November 16th, 2010, 05:23 AM
  5. java xml-rpc response parsing to xml
    By kievari in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: November 19th, 2009, 02:36 PM