473,484 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

print the content of a element in a xml file using libxml2 parser.

how we can print the content of the element in a XML file using
libxml2
example:
this is my xml file
<record>
<firstname>myfile</firstname>
<lastname>yourfile</lastname>
</record>
know i want to print the content as "myfile" when
i give element firstname
as i m using libxml2 parser.
and i trying 'xpath1.c' given in www.xmlsoft.org code examples.
how can i do this
i m doing xpath2.c correctly.
thank u, in advance
hari
Jun 27 '08 #1
0 1751

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2171
by: laura | last post by:
newbie... expath vs libxml2... libxml2 is an implementation of dom expath is a sax parser both comes with php installation (ie 4.3) both need to have php recompiled:
2
2086
by: Rick | last post by:
Hi.. I've got some code I wrote in PHP that will generate a new argument string for the browser, but the xhtml parser in Firefox and Opera both complain about my use of &var=value pairs. Below...
6
9694
by: Dave Kuhlman | last post by:
Suppose that I have content that looks like what I've included at the end of this message. Is there something in the standard Python library that will help me parse it, break into the parts...
6
1602
by: ai2003lian | last post by:
Assuming I have the following two xml file: source.xml: <AllFields> <Group name="G1"> <Field fieldName="f1">Value1</Field> <Field fieldName="f2">Value2</Field> <Field...
6
1664
by: Lord0 | last post by:
Hi there, How do I define in a schema that an element (<element>) may have any content i.e. text, other elements, partial elements, angle brackets etc? So all of the following would be valid:...
1
4110
by: cesar.ortiz | last post by:
Hi all, I have created an example using libxml2 based in the code that appears in http://xmlsoft.org/python.html. My example processes an enough amount of html files to see that the memory...
6
4528
by: saumya.agarwal | last post by:
Hi, I am using libxml2 for xml parsing. When the client application sends data to libxml2 in UTF-8 format, it works fine. But, I have a scenarion in which the client application sends data to...
3
3530
by: jinendrashankar | last post by:
i am getting following error in my code help me to slove this issue $ gcc -Wall -g -I/usr/include/libxml2/libxml -c create_xml.c In file included from create_xml.c:2:...
0
398
by: sharan | last post by:
how we can print the content of the element in a XML file using libxml2 as i want to use it with "xpath" example: this is my xml file <record> <firstname>myfile</firstname>...
0
7106
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6815
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7226
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4848
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4531
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3042
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1362
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
592
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.