Define Class xmlparserclass As Custom
	cXmlCursor = [crsXmlCrs]
	ParseError=""

	Function Load
		Lparameters lcFile
		LOCAL loex as Exception 
		loex=null
		If Used(This.cXmlCursor)
			Use In (This.cXmlCursor)
		Endif
		Try
			Xmltocursor(lcFile,This.cXmlCursor,512)
		Catch To loex
		    Messagebox("Structura fisierului Xml nu este corecta!",0+16, 'Eroare')
		ENDTRY
		RETURN loex      
		Endfunc

	Procedure getCursorItems
		Lparameters tcNumeCursor
		If Used(tcNumeCursor)
			Use In (tcNumeCursor)
		Endif
		Select Item From (This.cXmlCursor) Into Cursor (tcNumeCursor) Readwrite
	Endproc

	Function SelectNodes
		Lparameters lcItem
		Local lcVersiune,lcCursorVechi
		lcCursorVechi = Alias()
		Select (This.cXmlCursor)
		Locate For Upper(Alltrim(Item)) = Upper(Alltrim(lcItem))
		If Found()
			lcUsermsg = Iif(Empty(Alltrim(usermsg)),[S-a gasit ] + Upper(Alltrim(lcItem)) +[ versiunea ] + Alltrim(Version) + [.] + ;
				[Programul va incepe procedurile de actualizare!],Alltrim(usermsg))
			lcVersiune = "<" + Alltrim(Version) + ">(" + Alltrim(fileURL) + "){" + lcUsermsg + "}"
		Else
			lcVersiune = [<>(){}]
		Endif
		Select (lcCursorVechi)
		Return lcVersiune
	Endfunc

	Procedure Destroy
		If Used(This.cXmlCursor)
			Use In (This.cXmlCursor)
		Endif
	Endproc
Enddefine
