Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use wwXML.XMLToCursor()
Message
Information générale
Forum:
Internet
Catégorie:
XML
Titre:
How to use wwXML.XMLToCursor()
Divers
Thread ID:
00495751
Message ID:
00495751
Vues:
34
Ok ! I am new with XML. This is what I did to export two tables ( parent and child) to XML with wwxml class. My XML is created OK.
	oXML = CREATEOBJECT('wwXML')
	oXML.lCreateDataStructure = .t. && Schema

	*** Create the DTDs for the two tables
	select CDefFile
	lcDTD1 = oXML.CreateDataStructureDTD('DefFile','Row_Def')

	select CFiche
	lcDTD2 = oXML.CreateDataStructureDTD('Fiche','Row_Fch')

	*** Create the full DTD
	lcDTD = '<!DOCTYPE LowLevel [' + CR +;
		'<!ELEMENT LowLevel (DefFile,Fiche)>' + CR + ;
		lcDTD1 + lcDTD2 + ;
		']>'

	*** Add the root node manually
	lcOutput = '<LowLevel>' +CR

	*** Now create the data XML
	Sele CDefFile
	lcOutput = lcOutput + oXML.CreateCursorXML('DefFile','Row_Def',2)

	select CFiche
	lcOutput = lcOutput + oXML.CreateCursorXML('Fiche','Row_Fch',2)

	*** Must add XML header and add the closing DocRoot element
	lcOutput = [<?xml version='1.0'?>] + CR +;
		lcDTD + ;
		CR + lcOutput + ;
		'</LowLevel>'


	*** Show it
	Strtofile(lcOutput,tcXMLFIle)
Now How do I restore the two Cursor? Do I use XMLToCursor or I have to split the XML file in two?
Répondre
Fil
Voir

Click here to load this message in the networking platform