TEXT _docFilterFilePath
TEXT _docDataFilePath
INT _docFilter
INT _docData
INT _elmRoot
INT _elmLev1
INT _elmLev2
INT _elmLev3
INT _elmText
BOOL _setValueOk
INT _text
INT _count
BOOL _docFilterFreeOk
BOOL _docDataFreeOk
;vytvorenie prázdnych dokumentov pre filter a pre predpis na aktualizáciu
_docFilter := %XML_CreateDocument()
_docData := %XML_CreateDocument()
;vybudovanie dokumentu pre filter
_elmRoot := %XML_AddElement(_docFilter,"ROOT") ;<ROOT>
_elmLev1 := %XML_AddElement(_elmRoot,"FILTER_OPTIONS") ;<FILTER_OPTIONS>
_elmLev2 := %XML_AddElement(_elmLev1,"Operator") ;<Operator>
_elmText := %XML_AddTextNode(_elmLev2,"#text")
_setValueOk := %XML_SetNodeValue(_elmText,"AND") ;AND
_elmLev1 := %XML_AddElement(_elmRoot,"CFGRECORDS") ;<CFGRECORDS>
_elmLev2 := %XML_AddElement(_elmLev1,"TObjItemData") ;<TObjItemData>
_elmLev3 := %XML_AddElement(_elmLev2,"Name") ;<Name>
_elmText := %XML_AddTextNode(_elmLev3,"#text")
_setValueOk := %XML_SetNodeValue(_elmText,"H._S*") ;H._S*
_elmLev3 := %XML_AddElement(_elmLev2,"Typ") ;<Typ>
_elmText := %XML_AddTextNode(_elmLev3,"#text")
_setValueOk := %XML_SetNodeValue(_elmText,"ARCH_VAL") ;ARCH_VAL
;vybudovanie dokumentu pre predpis na aktualizáciu
_elmRoot := %XML_AddElement(_docData,"ROOT") ;<ROOT>
_elmLev1:= %XML_AddElement(_elmRoot,"CFGRECORDS") ;<CFGRECORDS>
_elmLev2 := %XML_AddElement(_elmLev1,"TObjItemData") ;<TObjItemData>
_elmLev3 := %XML_AddElement(_elmLev2,"Name") ;<Name>
_elmText := %XML_AddTextNode(_elmLev3,"#text")
_setValueOk := %XML_SetNodeValue(_elmText,"filter.xml") ;filter.xml
_elmLev3 := %XML_AddElement(_elmLev2,"Descript") ;<Descript>
_elmText := %XML_AddTextNode(_elmLev3,"#text")
_setValueOk := %XML_SetNodeValue(_elmText,"popis_01") ;popis_XX
;aktualizácia popisov objektov vyhovujúcich filtru
_count := %XML_UpdateObjects(_docData,_docFilter) ;import dokumentu
;uloženie na disk a uvoľnenie
_docFilterFreeOk := %XML_FreeDocument(_docFilter)
_docDataFreeOk := %XML_FreeDocument(_docData)
Pridať komentár