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
;empty document creation for filter and for formula which will be updated
_docFilter := %XML_CreateDocument()
_docData := %XML_CreateDocument()
;document formation for 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
;document formation for formula which will be updated
_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,"description_01") ;description_XX
;update of the objects description convenient to filter
_count := %XML_UpdateObjects(_docData,_docFilter) ;document import
;save on disc and release
_docFilterFreeOk := %XML_FreeDocument(_docFilter)
_docDataFreeOk := %XML_FreeDocument(_docData)
0 komentárov