Bonjour,
J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
pas des exemplessimples sous Windows.
Je voudrais lire des informations à partir d'un fichier XML pour les
utiliser après dans mon programme C. Ce fichier XML est assez
volumineux. Ce fichier a une structure bien définie.
En général voici la structure de ce fichier:
On trouve :
- le type de document
- le nombre d'objets, le nombre d'attributs et le nombre des concepts
- le nom de lattice
- la liste des objets
- le liste des attributs
- la liste des concepts
Je m'intéresse à liste des concepts dans mon programme C.
Voici en général la structure de ce fichier "nom.lat.xml"
<Galicia_Document>
<Lattice numberObj="5" numberAtt="4" numberCpt="11">
<Name>lattice(essai)</Name>
<Object>3</Object>
.....
<Object>4</Object>
<Attribute>b</Attribute>
........
<Attribute>a</Attribute>
<Concept>
<ID> 1 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
</Intent>
<UpperCovers>
</UpperCovers>
........
.........
.......
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
Comment je vais positionner sur le dernier identifiant <ID> 11 </ID>
pour extraire toutes les valeurs de balise <Attribute_Ref> </
Attribute_Ref> qui existent entre les deux balises
<Intent> </Intent> ?
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
Ces valeurs d, b, c et a je vais les utiliser dans mon programme C.
Aussi de même, je veux lire les valeurs 10, 8, 9 et 7 entre les deux
balises <Concept_Ref>
</Concept_Ref> qui existent sous les balises <UpperCovers> </
UpperCovers>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
Voici mon fichier XML complet nommé "essai.lat.xml":
<Galicia_Document>
<Lattice numberObj="5" numberAtt="4" numberCpt="11">
<Name>lattice(essai)</Name>
<Object>3</Object>
<Object>2</Object>
<Object>1</Object>
<Object>5</Object>
<Object>4</Object>
<Attribute>d</Attribute>
<Attribute>b</Attribute>
<Attribute>c</Attribute>
<Attribute>a</Attribute>
<Concept>
<ID> 1 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
</Intent>
<UpperCovers>
</UpperCovers>
</Concept>
<Concept>
<ID> 2 </ID>
<Extent>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 5 </ID>
<Extent>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>b</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 4 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 3 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 8 </ID>
<Extent>
<Object_Ref>1</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>2</Concept_Ref>
<Concept_Ref>4</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 9 </ID>
<Extent>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>5</Concept_Ref>
<Concept_Ref>4</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 6 </ID>
<Extent>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>5</Concept_Ref>
<Concept_Ref>3</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 7 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>4</Concept_Ref>
<Concept_Ref>3</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 10 </ID>
<Extent>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>2</Concept_Ref>
<Concept_Ref>6</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
</Lattice>
</Galicia_Document>
Donc, comment je vais lire les valeurs déjà citées à partir de ce
fichier et comment je les mettre (dans des autres variables ou
directement je vais les utiliser) dans mon programme ?
S'il vous plaît, Pouvez-vous m'aider ?
Merci.
Bonjour,
J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
pas des exemplessimples sous Windows.
Je voudrais lire des informations à partir d'un fichier XML pour les
utiliser après dans mon programme C. Ce fichier XML est assez
volumineux. Ce fichier a une structure bien définie.
En général voici la structure de ce fichier:
On trouve :
- le type de document
- le nombre d'objets, le nombre d'attributs et le nombre des concepts
- le nom de lattice
- la liste des objets
- le liste des attributs
- la liste des concepts
Je m'intéresse à liste des concepts dans mon programme C.
Voici en général la structure de ce fichier "nom.lat.xml"
<Galicia_Document>
<Lattice numberObj="5" numberAtt="4" numberCpt="11">
<Name>lattice(essai)</Name>
<Object>3</Object>
.....
<Object>4</Object>
<Attribute>b</Attribute>
........
<Attribute>a</Attribute>
<Concept>
<ID> 1 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
</Intent>
<UpperCovers>
</UpperCovers>
........
.........
.......
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
Comment je vais positionner sur le dernier identifiant <ID> 11 </ID>
pour extraire toutes les valeurs de balise <Attribute_Ref> </
Attribute_Ref> qui existent entre les deux balises
<Intent> </Intent> ?
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
Ces valeurs d, b, c et a je vais les utiliser dans mon programme C.
Aussi de même, je veux lire les valeurs 10, 8, 9 et 7 entre les deux
balises <Concept_Ref>
</Concept_Ref> qui existent sous les balises <UpperCovers> </
UpperCovers>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
Voici mon fichier XML complet nommé "essai.lat.xml":
<Galicia_Document>
<Lattice numberObj="5" numberAtt="4" numberCpt="11">
<Name>lattice(essai)</Name>
<Object>3</Object>
<Object>2</Object>
<Object>1</Object>
<Object>5</Object>
<Object>4</Object>
<Attribute>d</Attribute>
<Attribute>b</Attribute>
<Attribute>c</Attribute>
<Attribute>a</Attribute>
<Concept>
<ID> 1 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
</Intent>
<UpperCovers>
</UpperCovers>
</Concept>
<Concept>
<ID> 2 </ID>
<Extent>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 5 </ID>
<Extent>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>b</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 4 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 3 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 8 </ID>
<Extent>
<Object_Ref>1</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>2</Concept_Ref>
<Concept_Ref>4</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 9 </ID>
<Extent>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>5</Concept_Ref>
<Concept_Ref>4</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 6 </ID>
<Extent>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>5</Concept_Ref>
<Concept_Ref>3</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 7 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>4</Concept_Ref>
<Concept_Ref>3</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 10 </ID>
<Extent>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>2</Concept_Ref>
<Concept_Ref>6</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
</Lattice>
</Galicia_Document>
Donc, comment je vais lire les valeurs déjà citées à partir de ce
fichier et comment je les mettre (dans des autres variables ou
directement je vais les utiliser) dans mon programme ?
S'il vous plaît, Pouvez-vous m'aider ?
Merci.
Bonjour,
J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
pas des exemplessimples sous Windows.
Je voudrais lire des informations à partir d'un fichier XML pour les
utiliser après dans mon programme C. Ce fichier XML est assez
volumineux. Ce fichier a une structure bien définie.
En général voici la structure de ce fichier:
On trouve :
- le type de document
- le nombre d'objets, le nombre d'attributs et le nombre des concepts
- le nom de lattice
- la liste des objets
- le liste des attributs
- la liste des concepts
Je m'intéresse à liste des concepts dans mon programme C.
Voici en général la structure de ce fichier "nom.lat.xml"
<Galicia_Document>
<Lattice numberObj="5" numberAtt="4" numberCpt="11">
<Name>lattice(essai)</Name>
<Object>3</Object>
.....
<Object>4</Object>
<Attribute>b</Attribute>
........
<Attribute>a</Attribute>
<Concept>
<ID> 1 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
</Intent>
<UpperCovers>
</UpperCovers>
........
.........
.......
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
Comment je vais positionner sur le dernier identifiant <ID> 11 </ID>
pour extraire toutes les valeurs de balise <Attribute_Ref> </
Attribute_Ref> qui existent entre les deux balises
<Intent> </Intent> ?
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
Ces valeurs d, b, c et a je vais les utiliser dans mon programme C.
Aussi de même, je veux lire les valeurs 10, 8, 9 et 7 entre les deux
balises <Concept_Ref>
</Concept_Ref> qui existent sous les balises <UpperCovers> </
UpperCovers>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
Voici mon fichier XML complet nommé "essai.lat.xml":
<Galicia_Document>
<Lattice numberObj="5" numberAtt="4" numberCpt="11">
<Name>lattice(essai)</Name>
<Object>3</Object>
<Object>2</Object>
<Object>1</Object>
<Object>5</Object>
<Object>4</Object>
<Attribute>d</Attribute>
<Attribute>b</Attribute>
<Attribute>c</Attribute>
<Attribute>a</Attribute>
<Concept>
<ID> 1 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
</Intent>
<UpperCovers>
</UpperCovers>
</Concept>
<Concept>
<ID> 2 </ID>
<Extent>
<Object_Ref>1</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 5 </ID>
<Extent>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>b</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 4 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>1</Object_Ref>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 3 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>1</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 8 </ID>
<Extent>
<Object_Ref>1</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>2</Concept_Ref>
<Concept_Ref>4</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 9 </ID>
<Extent>
<Object_Ref>4</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>5</Concept_Ref>
<Concept_Ref>4</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 6 </ID>
<Extent>
<Object_Ref>2</Object_Ref>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>5</Concept_Ref>
<Concept_Ref>3</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 7 </ID>
<Extent>
<Object_Ref>3</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>4</Concept_Ref>
<Concept_Ref>3</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 10 </ID>
<Extent>
<Object_Ref>5</Object_Ref>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>2</Concept_Ref>
<Concept_Ref>6</Concept_Ref>
</UpperCovers>
</Concept>
<Concept>
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
</Lattice>
</Galicia_Document>
Donc, comment je vais lire les valeurs déjà citées à partir de ce
fichier et comment je les mettre (dans des autres variables ou
directement je vais les utiliser) dans mon programme ?
S'il vous plaît, Pouvez-vous m'aider ?
Merci.
Bonjour,
J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
pas des exemplessimples sous Windows.
Bonjour,
J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
pas des exemplessimples sous Windows.
Bonjour,
J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
pas des exemplessimples sous Windows.
On 29 juil, 08:25, programmation wrote:
> Bonjour,
> J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
> comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
> pas des exemplessimples sous Windows.
> Je voudrais lire des informations à partir d'un fichier XML pour les
> utiliser après dans mon programme C. Ce fichier XML est assez
> volumineux. Ce fichier a une structure bien définie.
> En général voici la structure de ce fichier:
> On trouve :
> - le type de document
> - le nombre d'objets, le nombre d'attributs et le nombre des concepts
> - le nom de lattice
> - la liste des objets
> - le liste des attributs
> - la liste des concepts
> Je m'intéresse à liste des concepts dans mon programme C.
> Voici en général la structure de ce fichier "nom.lat.xml"
> <Galicia_Document>
> <Lattice numberObj="5" numberAtt="4" numberCpt="11">
> <Name>lattice(essai)</Name>
> <Object>3</Object>
> .....
> <Object>4</Object>
> <Attribute>b</Attribute>
> ........
> <Attribute>a</Attribute>
> <Concept>
> <ID> 1 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> </Intent>
> <UpperCovers>
> </UpperCovers>
> ........
> .........
> .......
> <ID> 11 </ID>
> <Extent>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> </Concept>
> Comment je vais positionner sur le dernier identifiant <ID> 11 </ID>
> pour extraire toutes les valeurs de balise <Attribute_Ref> </
> Attribute_Ref> qui existent entre les deux balises
> <Intent> </Intent> ?
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> Ces valeurs d, b, c et a je vais les utiliser dans mon programme C.
> Aussi de même, je veux lire les valeurs 10, 8, 9 et 7 entre les deux
> balises <Concept_Ref>
> </Concept_Ref> qui existent sous les balises <UpperCovers> </
> UpperCovers>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> Voici mon fichier XML complet nommé "essai.lat.xml":
> <Galicia_Document>
> <Lattice numberObj="5" numberAtt="4" numberCpt="11">
> <Name>lattice(essai)</Name>
> <Object>3</Object>
> <Object>2</Object>
> <Object>1</Object>
> <Object>5</Object>
> <Object>4</Object>
> <Attribute>d</Attribute>
> <Attribute>b</Attribute>
> <Attribute>c</Attribute>
> <Attribute>a</Attribute>
> <Concept>
> <ID> 1 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> </Intent>
> <UpperCovers>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 2 </ID>
> <Extent>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 5 </ID>
> <Extent>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>b</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 4 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 3 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 8 </ID>
> <Extent>
> <Object_Ref>1</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>2</Concept_Ref>
> <Concept_Ref>4</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 9 </ID>
> <Extent>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>5</Concept_Ref>
> <Concept_Ref>4</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 6 </ID>
> <Extent>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>5</Concept_Ref>
> <Concept_Ref>3</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 7 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>4</Concept_Ref>
> <Concept_Ref>3</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 10 </ID>
> <Extent>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>2</Concept_Ref>
> <Concept_Ref>6</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 11 </ID>
> <Extent>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> </Concept>
> </Lattice>
> </Galicia_Document>
> Donc, comment je vais lire les valeurs déjà citées à partir de ce
> fichier et comment je les mettre (dans des autres variables ou
> directement je vais les utiliser) dans mon programme ?
> S'il vous plaît, Pouvez-vous m'aider ?
> Merci.
Salut,
Je trouve deux méthodes sans LibXml2 : DOM et SAX.
Laquelle est la plus adaptée surtout je utilise des fichiers
volumineux et je m'intéresse au temps d'exécution le moins possible ?
Merci.
On 29 juil, 08:25, programmation <bouali.a...@gmail.com> wrote:
> Bonjour,
> J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
> comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
> pas des exemplessimples sous Windows.
> Je voudrais lire des informations à partir d'un fichier XML pour les
> utiliser après dans mon programme C. Ce fichier XML est assez
> volumineux. Ce fichier a une structure bien définie.
> En général voici la structure de ce fichier:
> On trouve :
> - le type de document
> - le nombre d'objets, le nombre d'attributs et le nombre des concepts
> - le nom de lattice
> - la liste des objets
> - le liste des attributs
> - la liste des concepts
> Je m'intéresse à liste des concepts dans mon programme C.
> Voici en général la structure de ce fichier "nom.lat.xml"
> <Galicia_Document>
> <Lattice numberObj="5" numberAtt="4" numberCpt="11">
> <Name>lattice(essai)</Name>
> <Object>3</Object>
> .....
> <Object>4</Object>
> <Attribute>b</Attribute>
> ........
> <Attribute>a</Attribute>
> <Concept>
> <ID> 1 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> </Intent>
> <UpperCovers>
> </UpperCovers>
> ........
> .........
> .......
> <ID> 11 </ID>
> <Extent>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> </Concept>
> Comment je vais positionner sur le dernier identifiant <ID> 11 </ID>
> pour extraire toutes les valeurs de balise <Attribute_Ref> </
> Attribute_Ref> qui existent entre les deux balises
> <Intent> </Intent> ?
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> Ces valeurs d, b, c et a je vais les utiliser dans mon programme C.
> Aussi de même, je veux lire les valeurs 10, 8, 9 et 7 entre les deux
> balises <Concept_Ref>
> </Concept_Ref> qui existent sous les balises <UpperCovers> </
> UpperCovers>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> Voici mon fichier XML complet nommé "essai.lat.xml":
> <Galicia_Document>
> <Lattice numberObj="5" numberAtt="4" numberCpt="11">
> <Name>lattice(essai)</Name>
> <Object>3</Object>
> <Object>2</Object>
> <Object>1</Object>
> <Object>5</Object>
> <Object>4</Object>
> <Attribute>d</Attribute>
> <Attribute>b</Attribute>
> <Attribute>c</Attribute>
> <Attribute>a</Attribute>
> <Concept>
> <ID> 1 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> </Intent>
> <UpperCovers>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 2 </ID>
> <Extent>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 5 </ID>
> <Extent>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>b</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 4 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 3 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 8 </ID>
> <Extent>
> <Object_Ref>1</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>2</Concept_Ref>
> <Concept_Ref>4</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 9 </ID>
> <Extent>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>5</Concept_Ref>
> <Concept_Ref>4</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 6 </ID>
> <Extent>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>5</Concept_Ref>
> <Concept_Ref>3</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 7 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>4</Concept_Ref>
> <Concept_Ref>3</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 10 </ID>
> <Extent>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>2</Concept_Ref>
> <Concept_Ref>6</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 11 </ID>
> <Extent>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> </Concept>
> </Lattice>
> </Galicia_Document>
> Donc, comment je vais lire les valeurs déjà citées à partir de ce
> fichier et comment je les mettre (dans des autres variables ou
> directement je vais les utiliser) dans mon programme ?
> S'il vous plaît, Pouvez-vous m'aider ?
> Merci.
Salut,
Je trouve deux méthodes sans LibXml2 : DOM et SAX.
Laquelle est la plus adaptée surtout je utilise des fichiers
volumineux et je m'intéresse au temps d'exécution le moins possible ?
Merci.
On 29 juil, 08:25, programmation wrote:
> Bonjour,
> J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
> comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
> pas des exemplessimples sous Windows.
> Je voudrais lire des informations à partir d'un fichier XML pour les
> utiliser après dans mon programme C. Ce fichier XML est assez
> volumineux. Ce fichier a une structure bien définie.
> En général voici la structure de ce fichier:
> On trouve :
> - le type de document
> - le nombre d'objets, le nombre d'attributs et le nombre des concepts
> - le nom de lattice
> - la liste des objets
> - le liste des attributs
> - la liste des concepts
> Je m'intéresse à liste des concepts dans mon programme C.
> Voici en général la structure de ce fichier "nom.lat.xml"
> <Galicia_Document>
> <Lattice numberObj="5" numberAtt="4" numberCpt="11">
> <Name>lattice(essai)</Name>
> <Object>3</Object>
> .....
> <Object>4</Object>
> <Attribute>b</Attribute>
> ........
> <Attribute>a</Attribute>
> <Concept>
> <ID> 1 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> </Intent>
> <UpperCovers>
> </UpperCovers>
> ........
> .........
> .......
> <ID> 11 </ID>
> <Extent>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> </Concept>
> Comment je vais positionner sur le dernier identifiant <ID> 11 </ID>
> pour extraire toutes les valeurs de balise <Attribute_Ref> </
> Attribute_Ref> qui existent entre les deux balises
> <Intent> </Intent> ?
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> Ces valeurs d, b, c et a je vais les utiliser dans mon programme C.
> Aussi de même, je veux lire les valeurs 10, 8, 9 et 7 entre les deux
> balises <Concept_Ref>
> </Concept_Ref> qui existent sous les balises <UpperCovers> </
> UpperCovers>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> Voici mon fichier XML complet nommé "essai.lat.xml":
> <Galicia_Document>
> <Lattice numberObj="5" numberAtt="4" numberCpt="11">
> <Name>lattice(essai)</Name>
> <Object>3</Object>
> <Object>2</Object>
> <Object>1</Object>
> <Object>5</Object>
> <Object>4</Object>
> <Attribute>d</Attribute>
> <Attribute>b</Attribute>
> <Attribute>c</Attribute>
> <Attribute>a</Attribute>
> <Concept>
> <ID> 1 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> </Intent>
> <UpperCovers>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 2 </ID>
> <Extent>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 5 </ID>
> <Extent>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>b</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 4 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>1</Object_Ref>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 3 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>1</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 8 </ID>
> <Extent>
> <Object_Ref>1</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>2</Concept_Ref>
> <Concept_Ref>4</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 9 </ID>
> <Extent>
> <Object_Ref>4</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>5</Concept_Ref>
> <Concept_Ref>4</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 6 </ID>
> <Extent>
> <Object_Ref>2</Object_Ref>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>5</Concept_Ref>
> <Concept_Ref>3</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 7 </ID>
> <Extent>
> <Object_Ref>3</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>4</Concept_Ref>
> <Concept_Ref>3</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 10 </ID>
> <Extent>
> <Object_Ref>5</Object_Ref>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>2</Concept_Ref>
> <Concept_Ref>6</Concept_Ref>
> </UpperCovers>
> </Concept>
> <Concept>
> <ID> 11 </ID>
> <Extent>
> </Extent>
> <Intent>
> <Attribute_Ref>d</Attribute_Ref>
> <Attribute_Ref>b</Attribute_Ref>
> <Attribute_Ref>c</Attribute_Ref>
> <Attribute_Ref>a</Attribute_Ref>
> </Intent>
> <UpperCovers>
> <Concept_Ref>10</Concept_Ref>
> <Concept_Ref>8</Concept_Ref>
> <Concept_Ref>9</Concept_Ref>
> <Concept_Ref>7</Concept_Ref>
> </UpperCovers>
> </Concept>
> </Lattice>
> </Galicia_Document>
> Donc, comment je vais lire les valeurs déjà citées à partir de ce
> fichier et comment je les mettre (dans des autres variables ou
> directement je vais les utiliser) dans mon programme ?
> S'il vous plaît, Pouvez-vous m'aider ?
> Merci.
Salut,
Je trouve deux méthodes sans LibXml2 : DOM et SAX.
Laquelle est la plus adaptée surtout je utilise des fichiers
volumineux et je m'intéresse au temps d'exécution le moins possible ?
Merci.
On 29 juil, 09:25, programmation wrote:
> Bonjour,
> J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
> comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
> pas des exemplessimples sous Windows.
Mais tu n'as absolument pas besoin de libxml !
Je viens de te donner le code pour parser avec les interfaces
Windows !
On dirait que ne lis aucune des réponses.
On 29 juil, 09:25, programmation <bouali.a...@gmail.com> wrote:
> Bonjour,
> J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
> comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
> pas des exemplessimples sous Windows.
Mais tu n'as absolument pas besoin de libxml !
Je viens de te donner le code pour parser avec les interfaces
Windows !
On dirait que ne lis aucune des réponses.
On 29 juil, 09:25, programmation wrote:
> Bonjour,
> J'ai bien installé Libxml2 dans mon projet de travail. Il me reste
> comment je vais l'utiliser dans mon programme C. De plus, je ne trouve
> pas des exemplessimples sous Windows.
Mais tu n'as absolument pas besoin de libxml !
Je viens de te donner le code pour parser avec les interfaces
Windows !
On dirait que ne lis aucune des réponses.
Je ne sais pas si MSXML implémente la méthoe SAX.
Je ne sais pas si MSXML implémente la méthoe SAX.
Je ne sais pas si MSXML implémente la méthoe SAX.
On 29 juil, 16:48, programmation wrote:
> Je ne sais pas si MSXML implémente la méthoe SAX.
Oui, je viens juste de répondre dans l'autre thread (tu poses n fois
la même question..)
On 29 juil, 16:48, programmation <bouali.a...@gmail.com> wrote:
> Je ne sais pas si MSXML implémente la méthoe SAX.
Oui, je viens juste de répondre dans l'autre thread (tu poses n fois
la même question..)
On 29 juil, 16:48, programmation wrote:
> Je ne sais pas si MSXML implémente la méthoe SAX.
Oui, je viens juste de répondre dans l'autre thread (tu poses n fois
la même question..)
On 29 juil, 16:49, Christian ASTOR wrote:
> On 29 juil, 16:48, programmation wrote:
> > Je ne sais pas si MSXML implémente la méthoe SAX.
> Oui, je viens juste de répondre dans l'autre thread (tu poses n fois
> la même question..)
Salut,
C'est vraie dans cet exemple "essai.lat.xml" n'est pas de grande
taille. Mais, en réalité je travaille sur des fichiers qui contiennen t
des centaines des concepts. De plus, je m'intéresse au temps
d'exécution le moins possible.
Je vois que vous préférez la méthode DOM. Est que DOM est simple qu e
SAX dans le traitement ?
- Est ce que ce mieux d'utiliser DOM ou SAX dans mon cas ?
- Pouvez vous m'expliquer pas à pas (comme par exemple dans le
traitement d'un fichier texte simple: ouvrir, lire, traiter et fermer)
comment je vais travailler avec MSXML (DOM ou SAX selon mon cas) car
je n'arrive pas à exploiter votre solution dans mon problème ?
- Comment je vais trouver les informations déjà citées au dessus en
appliquant votre solution ?
- Pouvez me donner le programme C qui me permet de trouver ces
informations sachant que vous avez le fichier "essai.lat.xml" au
dessus pour que je puisse bien vous comprendre ?
Merci.
On 29 juil, 16:49, Christian ASTOR <casto...@club-internet.fr> wrote:
> On 29 juil, 16:48, programmation <bouali.a...@gmail.com> wrote:
> > Je ne sais pas si MSXML implémente la méthoe SAX.
> Oui, je viens juste de répondre dans l'autre thread (tu poses n fois
> la même question..)
Salut,
C'est vraie dans cet exemple "essai.lat.xml" n'est pas de grande
taille. Mais, en réalité je travaille sur des fichiers qui contiennen t
des centaines des concepts. De plus, je m'intéresse au temps
d'exécution le moins possible.
Je vois que vous préférez la méthode DOM. Est que DOM est simple qu e
SAX dans le traitement ?
- Est ce que ce mieux d'utiliser DOM ou SAX dans mon cas ?
- Pouvez vous m'expliquer pas à pas (comme par exemple dans le
traitement d'un fichier texte simple: ouvrir, lire, traiter et fermer)
comment je vais travailler avec MSXML (DOM ou SAX selon mon cas) car
je n'arrive pas à exploiter votre solution dans mon problème ?
- Comment je vais trouver les informations déjà citées au dessus en
appliquant votre solution ?
- Pouvez me donner le programme C qui me permet de trouver ces
informations sachant que vous avez le fichier "essai.lat.xml" au
dessus pour que je puisse bien vous comprendre ?
Merci.
On 29 juil, 16:49, Christian ASTOR wrote:
> On 29 juil, 16:48, programmation wrote:
> > Je ne sais pas si MSXML implémente la méthoe SAX.
> Oui, je viens juste de répondre dans l'autre thread (tu poses n fois
> la même question..)
Salut,
C'est vraie dans cet exemple "essai.lat.xml" n'est pas de grande
taille. Mais, en réalité je travaille sur des fichiers qui contiennen t
des centaines des concepts. De plus, je m'intéresse au temps
d'exécution le moins possible.
Je vois que vous préférez la méthode DOM. Est que DOM est simple qu e
SAX dans le traitement ?
- Est ce que ce mieux d'utiliser DOM ou SAX dans mon cas ?
- Pouvez vous m'expliquer pas à pas (comme par exemple dans le
traitement d'un fichier texte simple: ouvrir, lire, traiter et fermer)
comment je vais travailler avec MSXML (DOM ou SAX selon mon cas) car
je n'arrive pas à exploiter votre solution dans mon problème ?
- Comment je vais trouver les informations déjà citées au dessus en
appliquant votre solution ?
- Pouvez me donner le programme C qui me permet de trouver ces
informations sachant que vous avez le fichier "essai.lat.xml" au
dessus pour que je puisse bien vous comprendre ?
Merci.
On 30 juil, 14:02, programmation wrote:
> On 29 juil, 16:49, Christian ASTOR wrote:
> > On 29 juil, 16:48, programmation wrote:
> > > Je ne sais pas si MSXML implémente la méthoe SAX.
> > Oui, je viens juste de répondre dans l'autre thread (tu poses n foi s
> > la même question..)
> Salut,
> C'est vraie dans cet exemple "essai.lat.xml" n'est pas de grande
> taille. Mais, en réalité je travaille sur des fichiers qui contienn ent
> des centaines des concepts. De plus, je m'intéresse au temps
> d'exécution le moins possible.
> Je vois que vous préférez la méthode DOM. Est que DOM est simple que
> SAX dans le traitement ?
> - Est ce que ce mieux d'utiliser DOM ou SAX dans mon cas ?
> - Pouvez vous m'expliquer pas à pas (comme par exemple dans le
> traitement d'un fichier texte simple: ouvrir, lire, traiter et fermer)
> comment je vais travailler avec MSXML (DOM ou SAX selon mon cas) car
> je n'arrive pas à exploiter votre solution dans mon problème ?
> - Comment je vais trouver les informations déjà citées au dessus en
> appliquant votre solution ?
> - Pouvez me donner le programme C qui me permet de trouver ces
> informations sachant que vous avez le fichier "essai.lat.xml" au
> dessus pour que je puisse bien vous comprendre ?
> Merci.
Bonjour,
J'ai lu la documentation de MSXML (DOM et SAX). Mais je ne trouve pas
comment je vais extraire les informations qui existent dans mon
fichier XML à partir du mon programme C.
Vue que la première fois que je parse un fichier XML alors je ne
comprends pas le principe de le faire. par exemple dans la
manipulation de fichier texte. Il faut:
- tester l'existence du fichier
- ouvrir le fichier
- lire le fichier
- traitement
- fermeture.
Par analogie comment je vais lire les informations existant dans la
dernière balise de mon fichier XML ?
Je m'intéresse au cette partie (dernière balise "concep") du mon
fichier :
<Concept>
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
Je voudrais stocker les valeurs qui existent entre les sous balises
pour les utiliser dans mon programme C.
- <Extent> </Extent>
- <Attribute_Ref> </Attribute_Ref>
- <UpperCovers> </UpperCovers>
Comment je vais extraire ces valeurs ?
C'est urgent. Aidez-moi je suis bloqué.
Merci.
On 30 juil, 14:02, programmation <bouali.a...@gmail.com> wrote:
> On 29 juil, 16:49, Christian ASTOR <casto...@club-internet.fr> wrote:
> > On 29 juil, 16:48, programmation <bouali.a...@gmail.com> wrote:
> > > Je ne sais pas si MSXML implémente la méthoe SAX.
> > Oui, je viens juste de répondre dans l'autre thread (tu poses n foi s
> > la même question..)
> Salut,
> C'est vraie dans cet exemple "essai.lat.xml" n'est pas de grande
> taille. Mais, en réalité je travaille sur des fichiers qui contienn ent
> des centaines des concepts. De plus, je m'intéresse au temps
> d'exécution le moins possible.
> Je vois que vous préférez la méthode DOM. Est que DOM est simple que
> SAX dans le traitement ?
> - Est ce que ce mieux d'utiliser DOM ou SAX dans mon cas ?
> - Pouvez vous m'expliquer pas à pas (comme par exemple dans le
> traitement d'un fichier texte simple: ouvrir, lire, traiter et fermer)
> comment je vais travailler avec MSXML (DOM ou SAX selon mon cas) car
> je n'arrive pas à exploiter votre solution dans mon problème ?
> - Comment je vais trouver les informations déjà citées au dessus en
> appliquant votre solution ?
> - Pouvez me donner le programme C qui me permet de trouver ces
> informations sachant que vous avez le fichier "essai.lat.xml" au
> dessus pour que je puisse bien vous comprendre ?
> Merci.
Bonjour,
J'ai lu la documentation de MSXML (DOM et SAX). Mais je ne trouve pas
comment je vais extraire les informations qui existent dans mon
fichier XML à partir du mon programme C.
Vue que la première fois que je parse un fichier XML alors je ne
comprends pas le principe de le faire. par exemple dans la
manipulation de fichier texte. Il faut:
- tester l'existence du fichier
- ouvrir le fichier
- lire le fichier
- traitement
- fermeture.
Par analogie comment je vais lire les informations existant dans la
dernière balise de mon fichier XML ?
Je m'intéresse au cette partie (dernière balise "concep") du mon
fichier :
<Concept>
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
Je voudrais stocker les valeurs qui existent entre les sous balises
pour les utiliser dans mon programme C.
- <Extent> </Extent>
- <Attribute_Ref> </Attribute_Ref>
- <UpperCovers> </UpperCovers>
Comment je vais extraire ces valeurs ?
C'est urgent. Aidez-moi je suis bloqué.
Merci.
On 30 juil, 14:02, programmation wrote:
> On 29 juil, 16:49, Christian ASTOR wrote:
> > On 29 juil, 16:48, programmation wrote:
> > > Je ne sais pas si MSXML implémente la méthoe SAX.
> > Oui, je viens juste de répondre dans l'autre thread (tu poses n foi s
> > la même question..)
> Salut,
> C'est vraie dans cet exemple "essai.lat.xml" n'est pas de grande
> taille. Mais, en réalité je travaille sur des fichiers qui contienn ent
> des centaines des concepts. De plus, je m'intéresse au temps
> d'exécution le moins possible.
> Je vois que vous préférez la méthode DOM. Est que DOM est simple que
> SAX dans le traitement ?
> - Est ce que ce mieux d'utiliser DOM ou SAX dans mon cas ?
> - Pouvez vous m'expliquer pas à pas (comme par exemple dans le
> traitement d'un fichier texte simple: ouvrir, lire, traiter et fermer)
> comment je vais travailler avec MSXML (DOM ou SAX selon mon cas) car
> je n'arrive pas à exploiter votre solution dans mon problème ?
> - Comment je vais trouver les informations déjà citées au dessus en
> appliquant votre solution ?
> - Pouvez me donner le programme C qui me permet de trouver ces
> informations sachant que vous avez le fichier "essai.lat.xml" au
> dessus pour que je puisse bien vous comprendre ?
> Merci.
Bonjour,
J'ai lu la documentation de MSXML (DOM et SAX). Mais je ne trouve pas
comment je vais extraire les informations qui existent dans mon
fichier XML à partir du mon programme C.
Vue que la première fois que je parse un fichier XML alors je ne
comprends pas le principe de le faire. par exemple dans la
manipulation de fichier texte. Il faut:
- tester l'existence du fichier
- ouvrir le fichier
- lire le fichier
- traitement
- fermeture.
Par analogie comment je vais lire les informations existant dans la
dernière balise de mon fichier XML ?
Je m'intéresse au cette partie (dernière balise "concep") du mon
fichier :
<Concept>
<ID> 11 </ID>
<Extent>
</Extent>
<Intent>
<Attribute_Ref>d</Attribute_Ref>
<Attribute_Ref>b</Attribute_Ref>
<Attribute_Ref>c</Attribute_Ref>
<Attribute_Ref>a</Attribute_Ref>
</Intent>
<UpperCovers>
<Concept_Ref>10</Concept_Ref>
<Concept_Ref>8</Concept_Ref>
<Concept_Ref>9</Concept_Ref>
<Concept_Ref>7</Concept_Ref>
</UpperCovers>
</Concept>
Je voudrais stocker les valeurs qui existent entre les sous balises
pour les utiliser dans mon programme C.
- <Extent> </Extent>
- <Attribute_Ref> </Attribute_Ref>
- <UpperCovers> </UpperCovers>
Comment je vais extraire ces valeurs ?
C'est urgent. Aidez-moi je suis bloqué.
Merci.