Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

Display XML in JTree

Thread view: 
Rasikow Gnaniyar - 12 Mar 2008 11:47 GMT
i want to display XML file in Jtree view?
this is my xml:

<?xml version="1.0" encoding="UTF-8"?>
<mp_tree>
    <mp_node_0 catId="2" category="automobiles" tree="1" inActive="1"
dateAdded="2008-03-11 19:56:21.0" />
      < child node of Automobiles>
    <mp_node_0 catId="3" category="States" tree="1" inActive="0"
dateAdded="2008-03-11 19:57:55.0" />

</mp_tree>

output should be in tree view:

Automobiles
 - Truck
 - Cars
States
 - blah
 - blah
RedGrittyBrick - 12 Mar 2008 12:50 GMT
> i want to display XML file in Jtree view?
>  this is my xml:
[quoted text clipped - 6 lines]
>     <mp_node_0 catId="3" category="States" tree="1" inActive="0"
> dateAdded="2008-03-11 19:57:55.0" />

That is not valid XML. I doubt any XML-parser will read it.
the mp_tree and " child node of Automobiles" tags are unclosed.

> </mp_tree>
>
> output should be in tree view:
>
> Automobiles
>   - Truck

The word "Truck" does not appear in your XML above.

>   - Cars
> States
>   - blah
>   - blah

Did you have problems with the code in the references I gave earlier?
What Java have you written so far?

Signature

RGB



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.