Results 1 to 4 of 4
  1. #1
    Omarero is offline Member
    Join Date
    Oct 2008
    Posts
    25
    Rep Power
    0

    Default how can i append new element and child from java

    if i have xml file for example:
    <bookmark>
    <website>

    <title>goal </title>
    <description>football-site</description>
    </website>

    <website>

    <title>news</title>
    <description>all news</description>

    </website>



    </bookmark>

    if i want to append new web site with its new title and description. in java
    to look like the following:

    <bookmark>
    <website>

    <title>goal </title>
    <description>football-site</description>
    </website>

    <website>

    <title>news</title>
    <description>all news</description>

    </website>

    <website>

    <title>programs</title>
    <description>about java</description>

    </website>



    </bookmark>

  2. #2
    mvg's Avatar
    mvg
    mvg is offline Member
    Join Date
    Oct 2008
    Posts
    23
    Rep Power
    0

    Default

    I too have the same question. Can anyone please help us?

  3. #3
    racerxadam is offline Member
    Join Date
    Jul 2008
    Posts
    68
    Rep Power
    0

    Default

    Use a third party library like dom4j that provides methods for parsing, creating xml documents. Read the API doc and look for tutorials on it.

  4. #4
    mvg's Avatar
    mvg
    mvg is offline Member
    Join Date
    Oct 2008
    Posts
    23
    Rep Power
    0

    Default

    Thank you racerxadam for your suggestion, I will try to solve my problems using this.

Similar Threads

  1. how to get the child class in inheritance?
    By java_fun2007 in forum New To Java
    Replies: 7
    Last Post: 09-29-2010, 09:35 AM
  2. Child Labor
    By freddieMaize in forum Forum Lobby
    Replies: 1
    Last Post: 11-16-2008, 08:59 PM
  3. Replies: 1
    Last Post: 10-17-2008, 10:18 AM
  4. java DOM: append text to node
    By newbieal in forum New To Java
    Replies: 2
    Last Post: 10-10-2008, 07:18 PM
  5. Parent & Child window issues......
    By jithan in forum New To Java
    Replies: 2
    Last Post: 09-20-2008, 09:21 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
  •