troubleshooting Question

xml file into a JList

Avatar of vbothello
vbothello asked on
Java
4 Comments1 Solution366 ViewsLast Modified:
I’m trying to read an xml file into a JList, My XML file is of the format below and I need the “TYPE_VAL” valname into my JList.  I also need be be able to filter for each TYPE (TypeA,TypeB etc).

How do you read this?

<MYCONFIG>      
    <TYPE typename = "TypeA">
            <TYPE_VAL valname = "VALUE1"/>      
            <TYPE_VAL valname = "VALUE2">      
                <MYFILE filename = "file1">
                </MYFILE>
                  </TYPE_VAL>
            <TYPE_VAL valname = "VALUE3"/>      
            <TYPE_VAL valname = "VALUE4"/>      
            <TYPE_VAL valname = "VALUE5"/>      
    </TYPE>  
    <TYPE typename = "TypeB">
            <TYPE_VAL valname = "TypeB VALUE1"/>      
            <TYPE_VAL valname = "TypeB VALUE2">      
                <MYFILE filename = "file1">
                </MYFILE>
            </TYPE_VAL>
            <TYPE_VAL valname = "TypeB VALUE3"/>      
            <TYPE_VAL valname = "TypeB VALUE4"/>    
            <TYPE_VAL valname = "TypeB VALUE5"/>      
    </TYPE>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros