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: Read modify save xml elements in java

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Read modify save xml elements in java

    Hi Guys, i'm new to this forum. I have been looking to find out some solution for how to read and edit xml file values and save it in the same xml file.

    I'm working on a Firefox extension and I have a xml file which i have created a xul tree to display the information from xml file and it works fine. Now, i want allow the user to edit the values of the xml values and save it dynamically.

    To display the values from xml file i have used query type xml in xul tree. I have posted this other websites to find out the solution but i couldn't get any proper response. Here i'm thinking in a different direction because I know how to connect java class in javascript xul using live connect.

    Please give me some idea to proceed with some sample code. I'm not really goot at programming...

    My xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <CONTACTS>
    <CONTACT>
    <PDE-Identity>N65539</PDE-Identity>
    <FirstName>Arun_niit</FirstName>
    <LastName>Arun_niit</LastName>
    <Facebook-ID/>
    <EMAILS>
    <EMail>
    <Type>yahoo</Type>
    <Value>nura_ice@yahoo.co.in</Value>
    </EMail>
    </EMAILS>
    </CONTACT>
    <CONTACT>
    <PDE-Identity>N65546</PDE-Identity>
    <FirstName>FodenBen'</FirstName>
    <LastName>Ben' Foden</LastName>
    <URL>http://www.facebook.com/profile.php?id=100002440474277</URL>
    <Facebook-ID>100002440474277</Facebook-ID>
    <EMAILS/>
    </CONTACT>
    <CONTACT>
    <PDE-Identity>N65553</PDE-Identity>
    <FirstName>GhorbelMahmoud</FirstName>
    <LastName>Mahmoud Ghorbel</LastName>
    <Facebook-ID/>
    <EMAILS>
    <EMail>
    <Type>alcatel-lucent</Type>
    <Value>mahmoud.ghorbel@alcatel-lucent.com</Value>
    </EMail>
    </EMAILS>
    </CONTACT>
    <CONTACT>
    <PDE-Identity>N65560</PDE-Identity>
    <FirstName>keyankarthik</FirstName>
    <LastName>karthik keyan</LastName>
    <Facebook-ID/>
    <EMAILS>
    <EMail>
    <Type>yahoo</Type>
    <Value>karthycse@yahoo.co.in</Value>
    </EMail>
    </EMAILS>
    </CONTACT>
    <CONTACT>
    <PDE-Identity>N65567</PDE-Identity>
    <FirstName>Rangarajkarthik</FirstName>
    <LastName>karthik Rangaraj</LastName>
    <Facebook-ID/>
    <EMAILS>
    <EMail>
    <Type>gmail</Type>
    <Value>kart2006@gmail.com</Value>
    </EMail>
    <EMail>
    <Type>yahoo</Type>
    <Value>karthikrangaraj@yahoo.com</Value>
    </EMail>
    </EMAILS>
    </CONTACT>
    <CONTACT>
    <PDE-Identity>N65576</PDE-Identity>
    <FirstName>ReddyAkky</FirstName>
    <LastName>Akky Reddy</LastName>
    <Facebook-ID/>
    <EMAILS>
    <EMail>
    <Type>gmail</Type>
    <Value>akkireddych@gmail.com</Value>
    </EMail>
    </EMAILS>
    </CONTACT>
    <CONTACT>
    <PDE-Identity>N65583</PDE-Identity>
    <FirstName>SandfordFrankie</FirstName>
    <LastName>Frankie Sandford</LastName>
    <URL>http://www.facebook.com/FrankieSandfordApprovedPage</URL>
    <Facebook-ID/>
    <EMAILS/>
    </CONTACT>
    <CONTACT>
    <PDE-Identity>N65590</PDE-Identity>
    <FirstName>TheSatsRochelle</FirstName>
    <LastName>Rochelle TheSats</LastName>
    <URL>http://www.facebook.com/profile.php?id=100002487211054</URL>
    <Facebook-ID>100002487211054</Facebook-ID>
    <EMAILS/>
    </CONTACT>
    <CONTACT>
    <PDE-Identity>N65597</PDE-Identity>
    <FirstName>KumarVeera</FirstName>
    <LastName>Veera_Kumar</LastName>
    <Facebook-ID/>
    <EMAILS>
    <EMail>
    <Type>yahoo</Type>
    <Value>KUMARg_81@yahoo.com</Value>
    </EMail>
    </EMAILS>
    </CONTACT>
    </CONTACTS>

    I have posted in this website too:
    HTML Code:
    http://stackoverflow.com/questions/6482549/function-to-edit-and-save-xul-tree-cell-values
    Please help me guys. Thank you very much.


  2. #2
    Junior Member Mrc0d3r's Avatar
    Join Date
    Jun 2011
    Location
    TCP/IP Layer 3
    Posts
    25
    My Mood
    Bored
    Thanks
    0
    Thanked 6 Times in 5 Posts

    Default Re: Read modify save xml elements in java

    This isn't the right place to ask this question.

  3. #3
    Junior Member
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Read modify save xml elements in java

    OK, please tell me where to post this this question? because i'm a new member to this forum.

Similar Threads

  1. [SOLVED] ArrayList object's elements confusing??? doesnt replace the elements? set() method?
    By chronoz13 in forum What's Wrong With My Code?
    Replies: 10
    Last Post: June 21st, 2011, 01:20 PM
  2. How to modify System.out.println()
    By emailkia in forum Java Theory & Questions
    Replies: 6
    Last Post: April 25th, 2011, 12:40 AM
  3. Java App - Add, Delete, Reorder elements of the buttons
    By alibm in forum AWT / Java Swing
    Replies: 5
    Last Post: March 7th, 2011, 08:46 AM
  4. Java JTextPane Save
    By ikurtz in forum File I/O & Other I/O Streams
    Replies: 9
    Last Post: April 28th, 2010, 01:02 AM
  5. Modify Colors in a Picture
    By theuniverse in forum Java Theory & Questions
    Replies: 0
    Last Post: October 17th, 2009, 04:49 PM