Results 1 to 3 of 3
Thread: Xml reading in java
- 06-08-2010, 06:39 AM #1
Member
- Join Date
- Jun 2010
- Posts
- 1
- Rep Power
- 0
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
- 06-08-2010, 10:51 AM #2
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
try using JDom. it has all the APIs you need
-
XPath might be simpler to use if all you wish to do is extract those values.
Similar Threads
-
reading values into variables using java
By kskgupta in forum New To JavaReplies: 2Last Post: 05-16-2010, 05:48 AM -
reading URL using java through proxy server
By asheesh in forum NetworkingReplies: 16Last Post: 04-25-2010, 02:15 PM -
Reading a temperature sensor in Java
By michaelwest in forum New To JavaReplies: 2Last Post: 02-23-2010, 03:59 AM -
problem with reading excel sheet data reading using poi libraries
By sandeepsai17 in forum New To JavaReplies: 5Last Post: 08-21-2009, 11:03 AM -
reading dir in java applets
By willemjav in forum Java AppletsReplies: 3Last Post: 02-07-2008, 12:36 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks