Thread: regarding libxml2

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    90

    regarding libxml2

    how we can edit the content of the element in XML using libxml2
    example:
    this is my xml file
    <record>
    <firstname>sree</firstname>
    <lastname>cnu</lastname>
    </record>
    know i wan t to change the lastname to "vasu"
    so my final xml is
    <record>
    <firstname>sree</firstname>
    <lastname>vasu</lastname>
    </record>
    how can i do this
    i know deletion and creation of elemets but i don't know how to edit.
    thank u, inadvance
    sree.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Reading the documentation here may help: http://xmlsoft.org/html/index.html (It was the first item in "google libxml2 documentation".

    You'll probably get some better help if you actually try to produce some code and then ask questions on very specific things - generally, the more specific your question is, the more likely it is to be answered.



    --
    Mats

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    1
    Quote Originally Posted by cnu_sree View Post
    how we can edit the content of the element in XML using libxml2
    example:
    this is my xml file
    <record>
    <firstname>sree</firstname>
    <lastname>cnu</lastname>
    </record>
    know i wan t to change the lastname to "vasu"
    so my final xml is
    <record>
    <firstname>sree</firstname>
    <lastname>vasu</lastname>
    </record>
    how can i do this
    i know deletion and creation of elemets but i don't know how to edit.
    thank u, inadvance
    sree.
    hi go www.xmlsoft.org and then example program and then xpath2.c
    by using xpath2.c uhave to give ./xpath <xml filename> <xpath> <new modified value>

    hi can u tell me that how to delete and create element and how we can see the contenet of
    element like in ur program...how we can print "sree" or 'vasu'
    thanks

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,662
    > hi go www.xmlsoft.org and then example program and then xpath2.c
    matsp mentioned the same site almost a year ago, what exactly have you contributed to this dead thread?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 11-30-2006, 07:09 AM
  2. relative paths with XPath in libxml2
    By sparcz in forum C Programming
    Replies: 3
    Last Post: 10-12-2006, 02:49 AM
  3. Validating XML in ANSI C...
    By frozen in forum C Programming
    Replies: 2
    Last Post: 03-24-2006, 01:00 PM
  4. What is Libxml2??
    By dianazheng in forum C Programming
    Replies: 4
    Last Post: 11-07-2004, 07:39 AM