Long I
String ls_storedate
String ls_ProName
String ls_DrNaCode
String ls_Producer
String ls_Supplier
String ls_prospeci
String ls_medform
String ls_approval
String ls_batchno
String ls_effdate
String ls_stocknum
String ls_drugunit
String ls_indate
String ls_druncode
String ls_dir
String ls_dirver
Ls_storedate=string (today (), '- dd yyyy - mm)
Unoksoft_XMLParser XMLroot, XMLdata
XMLroot=newXML (' DailyIn ', ')
If isValid (XMLroot) then
XMLroot. Xmlencoding="utf-8"
//
Unoksoft_XMLParser OwBuInf
OwBuInf=XMLroot. Addelement (' OwBuInf ')
OwBuInf. Addattribute (' OwBuCode ', '360501')
//
Unoksoft_XMLParser ComInfo
ComInfo=OwBuInf. Addelement (' ComInfo ')
ComInfo. Addattribute (' ComCode ', 'B05A19)
ComInfo. Addattribute (' TransNo ', '0 ir5ifour0qk)
//
Unoksoft_XMLParser InRecord
InRecord=ComInfo. Addelement (' InRecord ')
InRecord. Addattribute (' StoreDate ', '+ ls_storedate +')
For I=1 to dw_jxxsdkcjl. Rowcount ()
Ls_Dir='not'
Ls_DirVer='
XMLdata. Addattribute (' Dir ', '+ ls_Dir +')
XMLdata. Addattribute (' DirVer ', '+ ls_DirVer +')
Next
String ls_file
The integer li_FileNum
Ls_file=XMLroot. Generatexml (true)
Li_FileNum=FileOpen (" e: \ 1. XML, "LineMode! The Write! , LockWrite! The Replace!
FileWrite (li_FileNum ls_file)
FileClose (li_FileNum)
Destroy XMLroot
The else
Gf_messagebox (2, 'failed to create an XML file. ')
End the if
Wrote 1. XML file, but IE open error,
CodePudding user response:
You see if there is something wrong with the content of the XML file, and is the filewrite write when the file is complete,CodePudding user response:
Unable to display the XML page,Using XSL style sheet cannot view XML input, please correct the error and then click the refresh button, or try again later,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Invalid characters found in text content, an error occurred when processing resources' file:///E:/mytest.xml ', line 3, 39
position: