Results 1 to 3 of 3
  1. #1
    Keerthana is offline Member
    Join Date
    Jun 2010
    Posts
    1
    Rep Power
    0

    Exclamation Xml reading in java

    Hi,

    My xml looks something like this:


    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <user>
    <userName>test</userName>
    <officeCenterId>100</officeCenterId>
    <roles>
    <role>ROLE_Principal</role>
    <role>ROLE_Student</role>
    </roles>
    </user>

    I want to read the values (userName, officeCenterId, role) of the xml in .java file.
    Can anybody help me on this.
    Thanks in advance

  2. #2
    vineetkr211 is offline Member
    Join Date
    May 2010
    Posts
    2
    Rep Power
    0

    Default

    try using JDom. it has all the APIs you need

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

Similar Threads

  1. reading values into variables using java
    By kskgupta in forum New To Java
    Replies: 2
    Last Post: 05-16-2010, 05:48 AM
  2. reading URL using java through proxy server
    By asheesh in forum Networking
    Replies: 16
    Last Post: 04-25-2010, 02:15 PM
  3. Reading a temperature sensor in Java
    By michaelwest in forum New To Java
    Replies: 2
    Last Post: 02-23-2010, 03:59 AM
  4. Replies: 5
    Last Post: 08-21-2009, 11:03 AM
  5. reading dir in java applets
    By willemjav in forum Java Applets
    Replies: 3
    Last Post: 02-07-2008, 12:36 AM

Posting Permissions

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