xml разбор с vba - PullRequest
       24

xml разбор с vba

0 голосов
/ 26 марта 2020

Я хочу проанализировать XML данные с XML веб-сайта в Excel. Как вы знаете, мы можем проанализировать данные XML без VBA или других технологий, просто щелкнув вкладки данных и т. Д. c. Но каждый раз, когда я обновляю sh, это вызывает ошибку, говорящую о том, что не удается сопоставить.

Поэтому я решил использовать VBA для анализа данных XML, но не могу понять, как , В заключение я хочу проанализировать данные счетчика моего онлайн-принтера. код XML указан ниже.


<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="system.xsl" type="text/xsl"?>
<MFP><ScreenName>system_counter</ScreenName>
<Title>Counter</Title>
<Common><SelNo>Auto</SelNo>
<LangNo>Ko</LangNo>
<Favorite>On</Favorite>
<AuthUserName>Public</AuthUserName>
<LoginServerIndex>0</LoginServerIndex><LoginMode>PublicUser</LoginMode><LoginName></LoginName><EnableWebConnection>true</EnableWebConnection><PcmSsId>210</PcmSsId>
<Simulator>false</Simulator>
<CertInstalled>true</CertInstalled>
<GreekEnable>true</GreekEnable><HebrewEnable>true</HebrewEnable><EncryptEnable>true</EncryptEnable><JpegEnable>false</JpegEnable><KeyVndBoxEnable>Off</KeyVndBoxEnable><BoxSort>false</BoxSort><DN30B1>Off</DN30B1><DN27B8>Off</DN27B8><DN38B8>Off</DN38B8><DN74B7>Off</DN74B7><DN35B3>Off</DN35B3><DN35B4>Off</DN35B4><DN41B2>Off</DN41B2><DN39B1>Off</DN39B1><DN42B8>Off</DN42B8><DN61B3>Off</DN61B3>
<DN75B3>Off</DN75B3><DN47B7>Off</DN47B7><DN49B7>Off</DN49B7><DN70B6>Off</DN70B6><DN52B5>Off</DN52B5><DN64B2>Off</DN64B2><DN65B7>Off</DN65B7><DN65B2>Off</DN65B2>
<DN69B2>Off</DN69B2>
<DN69B6>Off</DN69B6>
<DN80B4>On</DN80B4>
<DN71B4>Off</DN71B4>
<DN71B7>Off</DN71B7>
<DN92B7>Off</DN92B7>
<DN72B3>Off</DN72B3>
<DN72B5>Off</DN72B5>
<DN71B4>Off</DN71B4>
<DN73B1>Off</DN73B1>
<DN75B5>Off</DN75B5>
<DN75B8>Off</DN75B8>
<DN77B6>Off</DN77B6>
<DN75B1>Off</DN75B1>
<DN215B2>Off</DN215B2>
<PswcDirectPrint>On</PswcDirectPrint><DN79B6>Off</DN79B6>
<DN79B5>Off</DN79B5><DN130B1>Off</DN130B1><DN84B8>Off</DN84B8><DN4B1>Off</DN4B1><DN89B8>Off</DN89B8><DN90B1>Off</DN90B1><DN90B2>Off</DN90B2><DN90B3>On</DN90B3><DN90B4>Off</DN90B4><DN90B5>On</DN90B5><DN91B1>Off</DN91B1><DN91B2>On</DN91B2><DN91B3>Off</DN91B3><DN87B1>Off</DN87B1><DN89B4>Off</DN89B4>
<DN74B8>Off</DN74B8>
<DN76B5>Off</DN76B5><DN82B1>Off</DN82B1><DN101B5>On</DN101B5><DN112B6>Off</DN112B6>
<DN107B1>Off</DN107B1><DN119B3>Off</DN119B3><DN94B2>Off</DN94B2><DN109>2</DN109><IsGeneric>On</IsGeneric>
<DN111B6>Off</DN111B6>
<DN121B4>Off</DN121B4>
<DN122B8>Off</DN122B8>
<MyAddressEnable>Off</MyAddressEnable>
<KeyDeviceList><ArraySize>5</ArraySize><KeyDevice><Type>KeyCounter</Type><Status>False</Status><Installed>False</Installed></KeyDevice><KeyDevice><Type>ExternalManagementDevice</Type><Status>False</Status><Installed>False</Installed></KeyDevice><KeyDevice><Type>Vendor</Type><Status>False</Status><Installed>False</Installed></KeyDevice><KeyDevice><Type>ExternalManagementDeviceKM</Type><Status>False</Status><Installed>False</Installed></KeyDevice><KeyDevice><Type>VendorKM</Type><Status>False</Status><Installed>False</Installed></KeyDevice></KeyDeviceList><Info>
<EngType>OTHER</EngType>
</Info>
<FuncVer>10</FuncVer>
<DisplayErrorCode>Off</DisplayErrorCode><SendingDomainLimit>NoLimit</SendingDomainLimit><IsAral65>True</IsAral65><DisplayID>NONE</DisplayID><AddressLock>false</AddressLock><ColorFlag2>True</ColorFlag2><HDDLessFax>false</HDDLessFax>
<SupportFunction><AppOption><Preview>On</Preview><Stamp>On</Stamp><SendOperatorLog>On</SendOperatorLog><InspectLog>On</InspectLog><FileTypeNoLicence>On</FileTypeNoLicence><FileTypeWithLicence>Off</FileTypeWithLicence><Fax>On</Fax><BizhubRA>On</BizhubRA><SearchLdap>On</SearchLdap><Bmlinks>Off</Bmlinks><UbiquitousStorage>Off</UbiquitousStorage><UbiquitousClient>Off</UbiquitousClient><WebBrowser>On</WebBrowser><Iws>Off</Iws><UserControlCnt>On</UserControlCnt><Overlay>Off</Overlay></AppOption><MfpEquipModel>Performance</MfpEquipModel><FwRollbackApplicable>On</FwRollbackApplicable><LocalInterfaceKit>Off</LocalInterfaceKit><PlainPaperExApplicable>On</PlainPaperExApplicable>
<OOXMLFontData>On</OOXMLFontData>
</SupportFunction><Fiery>false</Fiery><EnableServerGroup>On</EnableServerGroup><EnableSimpleServerGroup>On</EnableSimpleServerGroup><EnableIccServerGroup>Off</EnableIccServerGroup><LScaleEnable>Invalid</LScaleEnable><DataRegistrationExtension>Off</DataRegistrationExtension><SecurityLevel>None</SecurityLevel><BoxCreatePermission>On</BoxCreatePermission>
<EnableBrowserInfoUser>Off</EnableBrowserInfoUser>
<DistributeSetting><Enable>On</Enable></DistributeSetting>
<ScanFunctionEnable>true</ScanFunctionEnable>
<MFPSmbFileSharing>Off</MFPSmbFileSharing>
<MFPSmbServer>Off</MFPSmbServer>
<PanelFlag>false</PanelFlag><ReqClientAddr>192.168.0.61</ReqClientAddr>
<ReqHostIpAddr>192.168.0.176</ReqHostIpAddr>
<Service><Info><MarketArea>Europe</MarketArea>
</Info>
<Setting><AuthSetting><SynchronizedTrack></SynchronizedTrack><AuthMode><ListOn>false</ListOn>
<PublicUser>true</PublicUser>
<BoxAdmin>false</BoxAdmin>
<AuthorityPermission>Off</AuthorityPermission>
<SendAddressLimit>Off</SendAddressLimit>
<AuthType>None</AuthType>
<MiddleServerUse>Off</MiddleServerUse>
<DefaultAuthType></DefaultAuthType>
</AuthMode><TrackMode>
<TrackType>None</TrackType>
</TrackMode><CommonMode>
<NoAuthPrintOn>false</NoAuthPrintOn>
</CommonMode>
<UserAndTrack>
<ColorManage>Color</ColorManage>
</UserAndTrack>
<AuthDataSearch><Enable>Off</Enable></AuthDataSearch>
</AuthSetting>
<General><KeyMode>None</KeyMode>
<OperationLevel><ProtectCopyProgramList><ArraySize>2</ArraySize><ProtectCopyProgram><KeyNo>1</KeyNo><Lock>false</Lock></ProtectCopyProgram><ProtectCopyProgram><KeyNo>2</KeyNo><Lock>false</Lock></ProtectCopyProgram></ProtectCopyProgramList><MagnificationLock>false</MagnificationLock><OverlayLock>false</OverlayLock><AddressLock>false</AddressLock><DeleteJobLock>true</DeleteJobLock><PriorityJobChangeLock>false</PriorityJobChangeLock><DirectEditAddressLock2>Off</DirectEditAddressLock2><FromAddressLock2>Allow</FromAddressLock2><AuthDataRegisterLock>On</AuthDataRegisterLock><ChangeSynchronizedTrack>Off</ChangeSynchronizedTrack><ProgramFunctionByUser>Off</ProgramFunctionByUser></OperationLevel>
</General>
<SystemConnection><AdminSend>Off</AdminSend><PrefixSuffix>Off</PrefixSuffix><MobilePrint>On</MobilePrint><ConnectApplication><MyPanelConnect>On</MyPanelConnect><MySpoolConnect>On</MySpoolConnect></ConnectApplication><ChangeUserDataPermission>Off</ChangeUserDataPermission><MobileConnection><QrCodeDisplay>Off</QrCodeDisplay><NfcSetting>Off</NfcSetting><BluetoothLeSetting>Off</BluetoothLeSetting><QrCodeSetting><WirelessConnection><Enable>Off</Enable><ConnectionType>MfpWirelessLanSetting</ConnectionType><IndividualSetting><Ssid></Ssid><AuthEncryptAlgorithm>None</AuthEncryptAlgorithm><WepKey><InputMethod>Ascii64bit</InputMethod><Key></Key></WepKey><PassPhraseString>Ascii</PassPhraseString><PassPhrase></PassPhrase></IndividualSetting></WirelessConnection></QrCodeSetting><AarStartingApp>PageScopeMobile</AarStartingApp></MobileConnection></SystemConnection>
</Setting>
</Service>
<System><ProductName>SINDOH D420</ProductName><ProductID>1.3.6.1.4.1.18334.1.2.1.2.1.131.3.9</ProductID><DeviceID></DeviceID><Oem>true</Oem><SerialNumber>792080550951</SerialNumber><ExternalIfMode>None</ExternalIfMode><ControllerInfoList><ArraySize>1</ArraySize><ControllerInfo><Type>Printer</Type><Name>SINDOH D420</Name><Version>A7PU0Y0-3000-G00-R2</Version></ControllerInfo></ControllerInfoList><SupportFunction><Copy>true</Copy><Print>true</Print><Scan>true</Scan><Fax>true</Fax><Fax2>false</Fax2><Fax3>Off</Fax3><Fax4>Off</Fax4><SipAdapter>false</SipAdapter><Ifax>false</Ifax><IpAddressFax>Off</IpAddressFax><JobNumberDisplayFunc>On</JobNumberDisplayFunc><UsbHostBoard>On</UsbHostBoard><Dsc>Off</Dsc><Dsc2>Off</Dsc2><Bluetooth>Off</Bluetooth><DualScan>Off</DualScan><InternalWebServer>On</InternalWebServer><CustomDocumentMode>Off</CustomDocumentMode><ExpansionNetworkAdapter>Off</ExpansionNetworkAdapter><DsBoard>Off</DsBoard><SlidePanel>Off</SlidePanel><AllowIPFilterSetting>On</AllowIPFilterSetting><BillingCounter>Off</BillingCounter><PowerSaveTimeUpperLimitChange>Off</PowerSaveTimeUpperLimitChange><TxReportImageAttach>On</TxReportImageAttach><NetworkIf>SingleWired</NetworkIf><TouchPanel>Electrostatic</TouchPanel><Sip>false</Sip><IPAddressFax>false</IPAddressFax><FaxBoard>true</FaxBoard><FaxBoard2>false</FaxBoard2><FaxBoard3>false</FaxBoard3><FaxBoard4>false</FaxBoard4></SupportFunction><GeneralContact><SiteName></SiteName><Info></Info><ProductHelpUrl></ProductHelpUrl><CorpUrl></CorpUrl><SupplyInfo></SupplyInfo><PhoneNumber></PhoneNumber><EmailAddress></EmailAddress><UtilityLink></UtilityLink><OnlineHelpUrl></OnlineHelpUrl><DriverUrl></DriverUrl></GeneralContact><UserContact><Contact></Contact><Name></Name><Location></Location><InternalNumber></InternalNumber></UserContact><Time><Year>2020</Year><Month>3</Month><Day>23</Day><Hour>9</Hour><Minute>45</Minute><Second>38</Second><TimeZone2><GmtDirection>East</GmtDirection><Hour>9</Hour><Minute>0</Minute></TimeZone2><TimeZone>East_9_00</TimeZone></Time><ExternalIfMode2>None</ExternalIfMode2><FunctionStatus><FunctionCode>0000000000000000000000000000000000000000000000000000010000000000</FunctionCode><WaitReboot>0000000000000000000000000000000000000000000000000000000000000000</WaitReboot><FunctionCodeReverse>0000000000100000000000000000000000000000000000000000000000000000</FunctionCodeReverse></FunctionStatus>
<Oem2>true</Oem2></System>
<DeviceInfo><Option><Hdd><Installed>true</Installed><Capacity>238454</Capacity></Hdd><Ssd><Installed>exist</Installed></Ssd><Memory><Installed>true</Installed><Capacity>2374</Capacity></Memory><Duplex><Installed>true</Installed><Type>Cycle</Type></Duplex><Adf><Installed>true</Installed><Type>Duplex</Type></Adf><CardAuthenticationDevice>Off</CardAuthenticationDevice>
<BiometricAuthenticationDevice>Off</BiometricAuthenticationDevice>
<LoadableDevice></LoadableDevice>
<EnableCardType></EnableCardType>
<WirelessAdapterType>Notattached</WirelessAdapterType>
</Option>
</DeviceInfo>
<DeviceStatus><ScanStatus>210033</ScanStatus>
<PrintStatus>130028</PrintStatus>
<Processing>0</Processing>
<JamCode>:</JamCode>
<NetworkErrorStatus>48</NetworkErrorStatus>
<KmSaasgw>2</KmSaasgw>
<HddMirroringErrorStatus>48</HddMirroringErrorStatus>
<DisplayJamCode>Off</DisplayJamCode></DeviceStatus>
</Common>
<Count><UserCounterInfo><TotalCounterList><ArraySize>23</ArraySize><TotalCounter><Type>Total</Type><Count>19224</Count></TotalCounter><TotalCounter><Type>DuplexTotal</Type><Count>3788</Count></TotalCounter><TotalCounter><Type>Document</Type><Count>19294</Count></TotalCounter><TotalCounter><Type>Paper</Type><Count>15330</Count></TotalCounter><TotalCounter><Type>TotalLarge</Type><Count>106</Count></TotalCounter><TotalCounter><Type>PrintPageTotal</Type><Count>19118</Count></TotalCounter><TotalCounter><Type>PaperSizeA3</Type><Count>106</Count></TotalCounter><TotalCounter><Type>PaperSizeA4</Type><Count>15224</Count></TotalCounter><TotalCounter><Type>PaperSizeB4</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperSizeB5</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperSizeStatement</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperSizeLetter</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperSizeLegal</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperSizeLedger</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperSizeLong</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperSizeOther</Type><Count>0</Count></TotalCounter><TotalCounter><Type>Nin12in1</Type><Count>90</Count></TotalCounter><TotalCounter><Type>Nin14in1</Type><Count>15</Count></TotalCounter><TotalCounter><Type>Nin1Other</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperTypeNormal</Type><Count>15330</Count></TotalCounter><TotalCounter><Type>PaperTypeNotDuplex</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperTypeUser</Type><Count>0</Count></TotalCounter><TotalCounter><Type>PaperTypeOther</Type><Count>0</Count></TotalCounter></TotalCounterList><TotalCounterData><Nin1TotalRate>0.685</Nin1TotalRate><DuplexTotalRate>24.710</DuplexTotalRate></TotalCounterData><PaperSheetCounter><FullColorCounterList><ArraySize>11</ArraySize><FullColorCounter><Type>PrintPageTotal</Type><Count>6573</Count></FullColorCounter><FullColorCounter><Type>A3</Type><Count>88</Count></FullColorCounter><FullColorCounter><Type>A4</Type><Count>6485</Count></FullColorCounter><FullColorCounter><Type>B4</Type><Count>0</Count></FullColorCounter><FullColorCounter><Type>B5</Type><Count>0</Count></FullColorCounter><FullColorCounter><Type>Statement</Type><Count>0</Count></FullColorCounter><FullColorCounter><Type>Letter</Type><Count>0</Count></FullColorCounter><FullColorCounter><Type>Legal</Type><Count>0</Count></FullColorCounter><FullColorCounter><Type>Ledger</Type><Count>0</Count></FullColorCounter><FullColorCounter><Type>Long</Type><Count>0</Count></FullColorCounter><FullColorCounter><Type>Other</Type><Count>0</Count></FullColorCounter></FullColorCounterList><BlackCounterList><ArraySize>11</ArraySize><BlackCounter><Type>PrintPageTotal</Type><Count>8635</Count></BlackCounter><BlackCounter><Type>A3</Type><Count>18</Count></BlackCounter><BlackCounter><Type>A4</Type><Count>8617</Count></BlackCounter><BlackCounter><Type>B4</Type><Count>0</Count></BlackCounter><BlackCounter><Type>B5</Type><Count>0</Count></BlackCounter><BlackCounter><Type>Statement</Type><Count>0</Count></BlackCounter><BlackCounter><Type>Letter</Type><Count>0</Count></BlackCounter><BlackCounter><Type>Legal</Type><Count>0</Count></BlackCounter><BlackCounter><Type>Ledger</Type><Count>0</Count></BlackCounter><BlackCounter><Type>Long</Type><Count>0</Count></BlackCounter><BlackCounter><Type>Other</Type><Count>0</Count></BlackCounter></BlackCounterList><DoubleColorCounterList><ArraySize>11</ArraySize><DoubleColorCounter><Type>PrintPageTotal</Type><Count>122</Count></DoubleColorCounter><DoubleColorCounter><Type>A3</Type><Count>0</Count></DoubleColorCounter><DoubleColorCounter><Type>A4</Type><Count>122</Count></DoubleColorCounter><DoubleColorCounter><Type>B4</Type><Count>0</Count></DoubleColorCounter><DoubleColorCounter><Type>B5</Type><Count>0</Count></DoubleColorCounter><DoubleColorCounter><Type>Statement</Type><Count>0</Count></DoubleColorCounter><DoubleColorCounter><Type>Letter</Type><Count>0</Count></DoubleColorCounter><DoubleColorCounter><Type>Legal</Type><Count>0</Count></DoubleColorCounter><DoubleColorCounter><Type>Ledger</Type><Count>0</Count></DoubleColorCounter><DoubleColorCounter><Type>Long</Type><Count>0</Count></DoubleColorCounter><DoubleColorCounter><Type>Other</Type><Count>0</Count></DoubleColorCounter></DoubleColorCounterList></PaperSheetCounter><CopyCounterList><ArraySize>9</ArraySize><CopyCounter><Type>BwTotal</Type><Count>5562</Count></CopyCounter><CopyCounter><Type>FullColorTotal</Type><Count>597</Count></CopyCounter><CopyCounter><Type>MonoColorTotal</Type><Count>0</Count></CopyCounter><CopyCounter><Type>BiColorTotal</Type><Count>8</Count></CopyCounter><CopyCounter><Type>Total</Type><Count>6167</Count></CopyCounter><CopyCounter><Type>BwLarge</Type><Count>18</Count></CopyCounter><CopyCounter><Type>FullColorLarge</Type><Count>2</Count></CopyCounter><CopyCounter><Type>MonoColorLarge</Type><Count>0</Count></CopyCounter><CopyCounter><Type>BiColorLarge</Type><Count>0</Count></CopyCounter></CopyCounterList><PrintCounterList><ArraySize>10</ArraySize><PrintCounter><Type>BwTotal</Type><Count>5734</Count></PrintCounter><PrintCounter><Type>FullColorTotal</Type><Count>7087</Count></PrintCounter><PrintCounter><Type>BiColorTotal</Type><Count>225</Count></PrintCounter><PrintCounter><Type>Total</Type><Count>13046</Count></PrintCounter><PrintCounter><Type>BwLarge</Type><Count>0</Count></PrintCounter><PrintCounter><Type>FullColorLarge</Type><Count>86</Count></PrintCounter><PrintCounter><Type>BiColorLarge</Type><Count>0</Count></PrintCounter><PrintCounter><Type>BwLongSize</Type><Count>0</Count></PrintCounter><PrintCounter><Type>FullColorLongSize</Type><Count>0</Count></PrintCounter><PrintCounter><Type>BiColorLongSize</Type><Count>0</Count></PrintCounter></PrintCounterList><ScanFaxCounterList><ArraySize>21</ArraySize><ScanFaxCounter><Type>DocumentReadTotal</Type><Count>11529</Count></ScanFaxCounter><ScanFaxCounter><Type>DocumentReadLarge</Type><Count>142</Count></ScanFaxCounter><ScanFaxCounter><Type>FaxReceive</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>FaxSend</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>PrintTotal</Type><Count>11</Count></ScanFaxCounter><ScanFaxCounter><Type>FaxPrintTotal</Type><Count>11</Count></ScanFaxCounter><ScanFaxCounter><Type>ScanPrintBwTotal</Type><Count>11</Count></ScanFaxCounter><ScanFaxCounter><Type>ScanPrintColorTotal</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>PrintLarge</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>ScanPrintBwLarge</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>ScanPrintColorLarge</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>DocxOcrOff</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>DocxOcrOn</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>XlsxOcrOff</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>XlsxOcrOn</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>PptxOcrOff</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>PptxOcrOn</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>NetworkFaxSendBWTotal</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>NetworkFaxSendColorTotal</Type><Count>0</Count></ScanFaxCounter><ScanFaxCounter><Type>ScanSendBWTotal</Type><Count>5841</Count></ScanFaxCounter><ScanFaxCounter><Type>ScanSendColorTotal</Type><Count>4639</Count></ScanFaxCounter></ScanFaxCounterList><EcoIndex><ColorPrintPage>41</ColorPrintPage><DuplexPrint>25</DuplexPrint><PageReduce>1</PageReduce>
...