您好,欢迎访问三七文档
当前位置:首页 > 办公文档 > 其它办公文档 > LabVIEW Internet Toolkit User Guide
©1999–2004NationalInstrumentsCorp.Allrightsreserved.LabVIEW™,NationalInstruments™,NI™,ni.com™,andNIDeveloperZone™aretrademarksofNationalInstrumentsCorporation.Productandcompanynamesmentionedhereinaretrademarksortradenamesoftheirrespectivecompanies.ForpatentscoveringNationalInstrumentsproducts,refertotheappropriatelocation:Help»Patentsinyoursoftware,thepatents.txtfileonyourCD,orni.com/patents.January2004323747A-01LabVIEWInternetToolkitUserGuideVersion6.0TheLabVIEWInternetToolkitprovidesyouwiththeabilitytoincorporateInternetcapabilitiesintoVIs.YoucanuseLabVIEWtoworkwithXMLdocuments,buildCGIprogramsandURLs,andsendandreceivedata.TheInternetToolkitincludesthefollowingcomponents:•XMLDOMParserandVIs—Create,access,andeditXMLdocumentsinLabVIEW.CGIVIs—BuildCGIprogramsandmanageclientstateinformation.GWebServer—PublishVIstotheWebandhostCGIapplications.Onlineexamples—LearnhowtobuildanduseCGIVIsbyreviewingonlineexampleVIsthatyoucanrunfromtheGWebServer.URLClientVIs—ParseandbuildURLsanddownloaddatafromInternetservers.FTPVIs—StoreandretrievefilesfromFTP(FileTransferProtocol)servers.TelnetVIs—SendandreceivedatausingtheTelnetprotocol.RefertotheLabVIEWHelpformoreinformationabouttheURLClientVIs,FTPVIs,andTelnetVIs.ContentsUpgradingfromVersion5.0...................................................................2GettingStartedwiththeXMLDOMParser...........................................2UsingXMLDOMParserVIs..........................................................3ValidatingXMLDocuments...........................................................3ConfiguringtheXMLDOMParser.................................................4UsingCGIinLabVIEW.........................................................................5MaintainingClientStateInformationwithCGIVIs.......................6UsingClient-SideCookies...............................................................7UsingServer-SideCookies..............................................................7GettingStartedwiththeGWebServer..................................................8™ni.comLabVIEWInternetToolkitUserGuide2ni.comConfiguringtheGWebServer.........................................................9RunningtheGWebServer...............................................................10ViewingOnlineExamples................................................................12ExaminingOnlineCGIExamples.............................................12DisplayingtheGWebServerWindowinDetailedMode...............13UsingCGIVIswiththeGWebServer............................................15PublishingFrontPanelImageswiththeGWebServer...................15WheretoGofromHere...........................................................................15UpgradingfromVersion5.0TheInternetToolkitversion6.0containsthefollowingchangesfromversion5.0:YoucanusetheInternetToolkitversion6.0onlywithLabVIEWversion7.0orlater.YoucanselectoneoftwodifferentmodestoruntheGWebServer.Inindependentmode,theGWebServerrunsonaportdifferentfromtheoneonwhichtheLabVIEWWebServerruns.Inshared-portmode,theGWebServersharesaportwiththeLabVIEWWebServerandhandlesonlyCGIrequests,whiletheLabVIEWWebServerhandlesotherrequests.RefertotheConfiguringtheGWebServersectionformoreinformationaboutselectingmodesfortheGWebServer.YoucanuseXMLDOMParserfeaturestoread,write,orprocessXMLdocuments.RefertotheGettingStartedwiththeXMLDOMParsersectionformoreinformationaboutusingXMLfeaturesinLabVIEW.YoucanfindtheSMTPE-mailVIsontheFunctionspaletteintheFullandProfessionalDevelopmentSystemsofLabVIEWversion7.0.ThefilenamesfortheseVIchangedslightly.TheInternetToolkitincludescompatibilitylibrariesthatautomaticallyreplacetheversion5.0VIswiththeLabVIEW7.0VIswhenyouopenaVIthatcontainstheolderversionoftheSMTPE-mailVIs.GettingStartedwiththeXMLDOMParserXML(ExtensibleMarkupLanguage)isaplatform-independentsubsetofSGML(StandardGeneralizedMarkupLanguage)thatyoucanusetostoreandexchangeinformation.WhenyouworkwithXMLdocuments,youcanuseaparsertoextractandmanipulatedatawithouthavingtotranslatetheXMLformatdirectly.Forexample,theDOM(DocumentObjectModel)Corespecificationdefinesaprogramminginterfaceforcreating,reading,andmodifyingXMLdocuments.TheDOMCorespecificationdefinesthepropertiesandmethodsthatanXMLDOMParsermustsupport.©NationalInstrumentsCorporation3LabVIEWInternetToolkitUserGuideTheInternetToolkitincludesanXMLDOMParserandapaletteofXMLDOMParserVIsthatyoucanusetoread,write,orotherwisemanipulateXMLdocuments.UsingXMLDOMParserVIsTheInternetToolkitXMLDOMParserVIsallowyoutoaccessacross-platformXMLDOMParserinLabVIEW,asshowninthefollowingexample.TheXMLOpenVIopensanXMLDOMParsersessionandreturnsanXMLDocumentreference.YoucancreateanXMLdocument,loadanexistingdocumentintotheXMLDOMParser,orconfiguredocumentsettings.Tomanipulateanexistingfile,usetheLoadFilemethodtoloadtheXMLdocumentintomemory.TheXMLdocumentisaccessibleunlesstheXMLDOMParserencounterserrorswiththedocument.UsetheGetXMLmethodtopopulateastringwiththecontentsofthecurrentXMLobject.Inthisexample,theXMLContentindicatordisplaysthe
本文标题:LabVIEW Internet Toolkit User Guide
链接地址:https://www.777doc.com/doc-3309229 .html