Bonjour ,
Actuellement je travaille sur ma premiere application Wmobile.L'application conttient une partie où pour faires des manipulations avec xml
j'arrive pas à faire ce que je veux exactement
j'arrive à ajouter un element mais en fait il ecrase le tout.donc à la fin il y'a un seul element dans le fichier
voilà le code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
 
sMondocEXPRESSEXPRESSEXPRESSEXPRESS est une chaîne = fChargeTexte("C:\Users\Reda\Downloads\file.xml")
XMLDocument("Dom","sMondocEXPRESSEXPRES")
XMLEcrit("DOM","/catalog/book/id", "ecrire")
XMLEcrit("DOM","/catalog/book/title", "Reda's book of fabulous engineering ")
XMLEcrit("DOM","/catalog/book/genre", "grateful")
XMLEcrit("DOM","/catalog/book/price", "2")
XMLEcrit("DOM","/catalog/book/publishe_date", "08/02/1993")
XMLEcrit("DOM","/catalog/book/description", "a book about nuthin")
fSauveTexte("C:\Users\Reda\Downloads\file.xml", XMLConstruitChaîne("DOM", XMLDocumentDéfaut, XMLEncodageIso8859_1))
XMLTermine("DOM")
et pour la recherche j'ai une erreur fatale
Nom : captureerreur.PNG
Affichages : 323
Taille : 26,1 Ko

voilà le 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
// Search from current position
 
 
XMLFind("C:\Users\Reda\Downloads\file.xml", "Reda's", XMLTag + XMLChildItem, XMLStartWith)
WHILE XMLFound("C:\Users\Reda\Downloads\file.xml") = True
	Info("Tag found " + XMLElementName("C:\Users\Reda\Downloads\file.xml"))
	// Next element in the search
	XMLNext("C:\Users\Reda\Downloads\file.xml")
END
XMLCancelSearch("C:\Users\Reda\Downloads\file.xml")
// Positions at the root of document
XMLRoot("C:\Users\Reda\Downloads\file.xml")
// Exact-match search from the beginning of document
XMLFind("C:\Users\Reda\Downloads\file.xml", "price", XMLTag + XMLContinue, XMLExact)
WHILE XMLFound("C:\Users\Reda\Downloads\file.xml") = True
	Info("Tag found " + XMLElementName("C:\Users\Reda\Downloads\file.xml"))
	// Next element in the search
	XMLNext("C:\Users\Reda\Downloads\file.xml")
END
XMLCancelSearch("C:\Users\Reda\Downloads\file.xml")
Merci pour l'aide