IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

XSL/XSLT/XPATH XML Discussion :

Debutant Libxml2 et C recherche de données dans XML


Sujet :

XSL/XSLT/XPATH XML

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé Avatar de Mika2008
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    176
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 176
    Par défaut Debutant Libxml2 et C recherche de données dans XML
    Bonjour,

    voila j’aimerais rechercher des données dans un fichier XML, Pour n'en garder que certain.

    j'ai regarder des codes d'emple de libxml2, mais ils ne sont pas trés clair.

    et je n'est rien trouvé sur comment rechercher une information d'une balise dans un xml.
    quelqu'un peut m'aiguiller svp ?

    merci @ vous.

  2. #2
    Membre confirmé Avatar de Mika2008
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    176
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 176
    Par défaut
    Par exemple ce code :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    #include <libxml/parser.h>
    #include <libxml/xpath.h>
     
    xmlDocPtr
    getdoc (char *docname) {
    	xmlDocPtr doc;
    	doc = xmlParseFile(docname);
     
    	if (doc == NULL ) {
    		fprintf(stderr,"Document not parsed successfully. \n");
    		return NULL;
    	}
     
    	return doc;
    }
     
    xmlXPathObjectPtr
    getnodeset (xmlDocPtr doc, xmlChar *xpath){
     
    	xmlXPathContextPtr context;
    	xmlXPathObjectPtr result;
     
    	context = xmlXPathNewContext(doc);
    	if (context == NULL) {
    		printf("Error in xmlXPathNewContext\n");
    		return NULL;
    	}
    	result = xmlXPathEvalExpression(xpath, context);
    	xmlXPathFreeContext(context);
    	if (result == NULL) {
    		printf("Error in xmlXPathEvalExpression\n");
    		return NULL;
    	}
    	if(xmlXPathNodeSetIsEmpty(result->nodesetval)){
    		xmlXPathFreeObject(result);
                    printf("No result\n");
    		return NULL;
    	}
    	return result;
    }
    int
    main(int argc, char **argv) {
     
    	char *docname;
    	xmlDocPtr doc;
    xmlChar *xpath = (xmlChar*) "//feed//entry//id";
    	xmlNodeSetPtr nodeset;
    	xmlXPathObjectPtr result;
    	int i;
    	xmlChar *keyword;
     
    	if (argc <= 1) {
    		printf("Usage: %s docname\n", argv[0]);
    		return(0);
    	}
     
    	docname = argv[1];
    	doc = getdoc(docname);
    	result = getnodeset (doc, xpath);
    	if (result) {
    		nodeset = result->nodesetval;
    		for (i=0; i < nodeset->nodeNr; i++) {
    			keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode, 1);
    		printf("keyword: %s\n", keyword);
    		xmlFree(keyword);
    		}
    		xmlXPathFreeObject (result);
    	}
    	xmlFreeDoc(doc);
    	xmlCleanupParser();
    	return (1);
    }
    je travaille sur ce fichier XML :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    <?xml version='1.0' encoding='UTF-8'?>
    <feed xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;DEYEQX87fyp7ImA9Wx9UF00.&quot;'>
    	<id>tag:youtube.com,2008:videos</id>
    	<updated>2011-02-14T17:55:00.107Z</updated>
    	<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
    	<title>YouTube Videos matching query: Ronald Jenkees</title>
    	<logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
    	<link rel='alternate' type='text/html' href='http://www.youtube.com'/>
    	<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos?v=2'/>
    	<link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/batch?v=2'/>
    	<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos?q=Ronald+Jenkees&amp;start-index=1&amp;max-results=2&amp;v=2'/>
    	<link rel='service' type='application/atomsvc+xml' href='http://gdata.youtube.com/feeds/api/videos?alt=atom-service&amp;v=2'/>
    	<link rel='next' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos?q=Ronald+Jenkees&amp;start-index=3&amp;max-results=2&amp;v=2'/>
    	<author>
    		<name>YouTube</name>
    		<uri>http://www.youtube.com/</uri>
    	</author>
    	<generator version='2.0' uri='http://gdata.youtube.com/'>YouTube data API</generator>
    	<openSearch:totalResults>2715</openSearch:totalResults>
    	<openSearch:startIndex>1</openSearch:startIndex>
    	<openSearch:itemsPerPage>2</openSearch:itemsPerPage>
    	<entry gd:etag='W/&quot;D0ANQX47eCp7ImA9Wx9UFkQ.&quot;'>
    		<id>tag:youtube.com,2008:video:smE-uIljiGo</id>
    		<published>2008-03-06T18:36:43.000Z</published>
    		<updated>2011-02-14T15:03:10.000Z</updated>
    		<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='Music' label='Music'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='ronald'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='jenkees'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='unsigned'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='motif'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='XS'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='XS8'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='keyboard'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='guitar'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='jam'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='beat'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='fl'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='studio'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='fruityloops'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='hip-hop'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='solo'/>
    		<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='instrumental'/>
    		<title>Ronald Jenkees - Guitar Sound</title>
    		<content type='application/x-shockwave-flash' src='http://www.youtube.com/v/smE-uIljiGo?f=videos&amp;app=youtube_gdata'/>
    		<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=smE-uIljiGo&amp;feature=youtube_gdata'/>
    		<link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/smE-uIljiGo/responses?v=2'/>
    		<link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/smE-uIljiGo/related?v=2'/>
    		<link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='http://m.youtube.com/details?v=smE-uIljiGo'/>
    		<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/smE-uIljiGo?v=2'/>
    		<author>
    			<name>ronaldjenkees</name>
    			<uri>http://gdata.youtube.com/feeds/api/users/ronaldjenkees</uri>
    			</author>
    			<yt:accessControl action='comment' permission='allowed'/>
    			<yt:accessControl action='commentVote' permission='allowed'/>
    			<yt:accessControl action='videoRespond' permission='moderated'/>
    			<yt:accessControl action='rate' permission='allowed'/>
    			<yt:accessControl action='embed' permission='allowed'/>
    			<yt:accessControl action='list' permission='allowed'/>
    			<yt:accessControl action='syndicate' permission='allowed'/>
    			<gd:comments>
    				<gd:feedLink href='http://gdata.youtube.com/feeds/api/videos/smE-uIljiGo/comments?v=2' countHint='28562'/>
    				</gd:comments>
    				<media:group>
    					<media:category label='Music' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>Music</media:category>
    					<media:content url='http://www.youtube.com/v/smE-uIljiGo?f=videos&amp;app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='255' yt:format='5'/>
    					<media:content url='rtsp://v2.cache1.c.youtube.com/CiILENy73wIaGQlqiGOJuD5hshMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='255' yt:format='1'/>
    					<media:content url='rtsp://v1.cache5.c.youtube.com/CiILENy73wIaGQlqiGOJuD5hshMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='255' yt:format='6'/>
    					<media:credit role='uploader' scheme='urn:youtube' yt:type='partner'>ronaldjenkees</media:credit>
    					<media:description type='plain'>download the MP3: www.ronaldjenkees.com **this tune is on my new CD, Disorganized Fun. I named it Guitar Sound. just havin some fun with a guitar sound (Hard Ramp AS1&amp;2) on the Motif XS8. Some have asked about the "low notes" that come out when I hit those two keys up top - those are guitar effects built in the patch and for whatever reason, Yamaha put those effects on the high keys. I made the background beat using FL Studio. I start the beat by hitting the space-bar on my computer keyboard before I play on the synth. PS. I've read some reviews of this vid as if I'm trying to be a "keytar" player (apparently not a desirable thing, but how can you not like Edgar Winter's "Frankenstein") and that I should just play a real guitar. LOL @ some of those same people who probably play guitar hero (nothing against it but hopefully you see my point)! The irony! The point is, folks, if you find a fun/inspiring sound to jam with, by all means, you should JAM WITH IT! I don't care if you find a $3.00 plastic trumpet. Don't worry about the technicalities and what people say. In the long run it's about the fun that YOU have making music. Thanks for watching!!!</media:description>
    					<media:keywords>ronald, jenkees, unsigned, motif, XS, XS8, keyboard, guitar, jam, beat, fl, studio, fruityloops, hip-hop, solo, instrumental</media:keywords>
    					<media:player url='http://www.youtube.com/watch?v=smE-uIljiGo&amp;feature=youtube_gdata_player'/>
    					<media:thumbnail url='http://i.ytimg.com/vi/smE-uIljiGo/default.jpg' height='90' width='120' time='00:02:07.500' yt:name='default'/>
    					<media:thumbnail url='http://i.ytimg.com/vi/smE-uIljiGo/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/>
    					<media:thumbnail url='http://i.ytimg.com/vi/smE-uIljiGo/1.jpg' height='90' width='120' time='00:01:03.750' yt:name='start'/>
    					<media:thumbnail url='http://i.ytimg.com/vi/smE-uIljiGo/2.jpg' height='90' width='120' time='00:02:07.500' yt:name='middle'/>
    					<media:thumbnail url='http://i.ytimg.com/vi/smE-uIljiGo/3.jpg' height='90' width='120' time='00:03:11.250' yt:name='end'/>
    					<media:title type='plain'>Ronald Jenkees - Guitar Sound</media:title>
    					<yt:duration seconds='255'/>
    					<yt:uploaded>2008-03-06T18:36:43.000Z</yt:uploaded>
    					<yt:videoid>smE-uIljiGo</yt:videoid>
    					</media:group>
    	<yt:statistics favoriteCount='52741' viewCount='7247365'/>
    	</entry>
    	<entry gd:etag='W/&quot;DkMBRn47eCp7ImA9Wx9UFkQ.&quot;'>
    						<id>tag:youtube.com,2008:video:0O2aH4XLbto</id>
    						<published>2008-08-05T21:56:54.000Z</published>
    						<updated>2011-02-14T14:40:57.000Z</updated>
    						<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
    						<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='Music' label='Music'/>
    						<title>Ronald Jenkees - Throwing Fire</title>
    						<content type='application/x-shockwave-flash' src='http://www.youtube.com/v/0O2aH4XLbto?f=videos&amp;app=youtube_gdata'/>
    						<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=0O2aH4XLbto&amp;feature=youtube_gdata'/>
    						<link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/0O2aH4XLbto/responses?v=2'/>
    						<link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/0O2aH4XLbto/related?v=2'/>
    						<link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='http://m.youtube.com/details?v=0O2aH4XLbto'/>
    						<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/0O2aH4XLbto?v=2'/>
    						<author>
    							<name>ronaldjenkees</name>
    							<uri>http://gdata.youtube.com/feeds/api/users/ronaldjenkees</uri>
    							</author>
    							<yt:accessControl action='comment' permission='allowed'/>
    							<yt:accessControl action='commentVote' permission='allowed'/>
    							<yt:accessControl action='videoRespond' permission='moderated'/>
    							<yt:accessControl action='rate' permission='allowed'/>
    							<yt:accessControl action='embed' permission='allowed'/>
    							<yt:accessControl action='list' permission='allowed'/>
    							<yt:accessControl action='syndicate' permission='allowed'/>
    							<gd:comments>
    								<gd:feedLink href='http://gdata.youtube.com/feeds/api/videos/0O2aH4XLbto/comments?v=2' countHint='28675'/>
    								</gd:comments>
    								<media:group>
    									<media:category label='Music' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>Music</media:category>
    									<media:content url='http://www.youtube.com/v/0O2aH4XLbto?f=videos&amp;app=youtube_gdata' type='application/x-shockwave-flash' medium='video' isDefault='true' expression='full' duration='190' yt:format='5'/>
    									<media:content url='rtsp://v4.cache2.c.youtube.com/CiILENy73wIaGQnabsuFH5rt0BMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='190' yt:format='1'/>
    									<media:content url='rtsp://v2.cache1.c.youtube.com/CiILENy73wIaGQnabsuFH5rt0BMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='190' yt:format='6'/>
    									<media:credit role='uploader' scheme='urn:youtube' yt:type='partner'>ronaldjenkees</media:credit>
    									<media:description type='plain'>Throwing Fire is on my 2nd CD, Disorganized Fun: www.ronaldjenkees.com SUPER FUN TIME WITH THIS JAM!!!! Thanks a lot for watching! Hope you liked it. Kindof a rough cut, but it's always fun. This video is dedicated to the band Papa Roach for letting me check out their studio and giving me a place to stay in LA. Those are some hard-working rockers and good guys. I got cold chills listening to the songs they're working on for their new album. I think it's coming out really soon. My friend Sam gave me the hat I'm wearing in this vid. It's made of 100% recycled material. Can't beat that. Here's their site: www.livity.org I'm using FL Studio software to make the beat in the background and a Korg Triton Le keyboard on top, Motif XS8 on bottom.</media:description>
    									<media:keywords/>
    									<media:player url='http://www.youtube.com/watch?v=0O2aH4XLbto&amp;feature=youtube_gdata_player'/>
    									<media:thumbnail url='http://i.ytimg.com/vi/0O2aH4XLbto/default.jpg' height='90' width='120' time='00:01:35' yt:name='default'/>
    									<media:thumbnail url='http://i.ytimg.com/vi/0O2aH4XLbto/hqdefault.jpg' height='360' width='480' yt:name='hqdefault'/>
    									<media:thumbnail url='http://i.ytimg.com/vi/0O2aH4XLbto/1.jpg' height='90' width='120' time='00:00:47.500' yt:name='start'/>
    									<media:thumbnail url='http://i.ytimg.com/vi/0O2aH4XLbto/2.jpg' height='90' width='120' time='00:01:35' yt:name='middle'/>
    									<media:thumbnail url='http://i.ytimg.com/vi/0O2aH4XLbto/3.jpg' height='90' width='120' time='00:02:22.500' yt:name='end'/>
    									<media:title type='plain'>Ronald Jenkees - Throwing Fire</media:title>
    									<yt:duration seconds='190'/>
    									<yt:uploaded>2008-08-05T21:56:54.000Z</yt:uploaded>
    									<yt:videoid>0O2aH4XLbto</yt:videoid>
    									</media:group>
    									<yt:statistics favoriteCount='52285' viewCount='6488178'/>
    </entry>
    </feed>
    en théorie dans le code C je lui demande de m'afficher le contenue de la balise //feed//entry//id
    xmlChar *xpath = (xmlChar*) "//feed//entry//id";

    quand ke lance le programme il met me no result ?
    alors qu'il aurait du m'afficher :
    tag:youtube.com,2008:video:smE-uIljiGo
    ce que contient la balise //feed/entry/if

    qu'en pensez vous svp ?

  3. #3
    Rédacteur

    Avatar de Erwy
    Homme Profil pro
    Développeur Web
    Inscrit en
    Novembre 2003
    Messages
    4 967
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Novembre 2003
    Messages : 4 967
    Par défaut
    je ne connais pas bien cette bibliotheque mais, le problème vient sans doute que tu utilises un namespace (non préfixé pour tout arrangé).

    xmlns='http://www.w3.org/2005/Atom'
    Et il faudrait le passer en paramètre à ta fonction

    Pour ce que j'ai trouvé sur le web essaye quelque chose comme
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     getnodeset (doc, xpath,'http://www.w3.org/2005/Atom')

  4. #4
    Membre confirmé Avatar de Mika2008
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    176
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 176
    Par défaut
    merci de ta réponse, mais ce le ne fonctionne pas :




    dans mon code je met ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    xmlChar *xpath = (xmlChar*) "http://www.w3.org/2005/Atom";
    ce qui me donne comme résultat :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    XPath error : Invalid expression
    http://www.w3.org/2005/Atom
         ^
    XPath error : Invalid expression
    http://www.w3.org/2005/Atom
         ^
    Error in xmlXPathEvalExpression

  5. #5
    Membre confirmé Avatar de Mika2008
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    176
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 176
    Par défaut
    j'ai trouvé ce petit article :

    http://xmlsoft.org/namespaces.html

    mais c'est pas trés claire?

  6. #6
    Membre confirmé Avatar de Mika2008
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    176
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 176
    Par défaut
    j'ai trouvé un début de réponse ici :

    urns out, as I found out from here, it is not really a failure of libXml, it's a problem because libXml correctly follows the XML/XPATH specifications.

    The solutions proposed by R Bourdeau are correct, however, if you have control of the xml document you are parsing.

    The context for the XPATH query is independent of the namespace qualifiers in the xml document. The default namespace forces all child tags into a namespace; they don't require qualification in the document but must be qualified in the xpath query. Fortunately, you registered the namespace as new with libXml, so cateof's solution should work.

    xmlXPathRegisterNs(context, BAD_CAST "new", BAD_CAST "http://www.example.com/new"

    xmlChar *xpath = (xmlChar*) "/new:book/new:section1";
    I'm inlining the xml here for visibility:

    <?xml version="1.0" encoding="UTF-8"?>
    <book xmlns="http://www.example.com/new">
    <section1>Sec_1</section1>
    <section2>Sec_2</section2>
    </book>

    par contre les balises comme ceci je n'arrive pas à extraire la donnée, le programme ne trouve pas cette balise :


    par exemple si je tape cette recherche :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    xmlChar *xpath_id_video= (xmlChar*) "/feed:feed/feed:entry/feed:media/feed:group/feed:yt/feed:videoid";

    je continue à chercher

Discussions similaires

  1. Rechercher des données dans un autre workbook
    Par Azounet1529 dans le forum Macros et VBA Excel
    Réponses: 9
    Dernier message: 23/07/2007, 08h26
  2. recherche de donnée dans deux tables
    Par donny dans le forum Langage SQL
    Réponses: 3
    Dernier message: 21/06/2007, 20h41
  3. recherche de données dans feuil excel
    Par tigdub1gal dans le forum Excel
    Réponses: 3
    Dernier message: 24/05/2007, 17h58
  4. recherche de donnée dans 2 colonnes
    Par zeloutre dans le forum Access
    Réponses: 10
    Dernier message: 05/03/2007, 12h08
  5. Recherche de Donnée dans une base
    Par Poisson59 dans le forum MS SQL Server
    Réponses: 10
    Dernier message: 19/09/2006, 11h40

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo