使用php读取Xml内容

时间:2019-05-13 15:54:32

标签: php xml soap

我有发送肥皂请求并使用print_r($ output)得到以下结果的php代码;如何使用php例如获取单个变量数据。

value $ refno ='UCR201900105262'

 <?xml version="1.0" encoding="UTF-8"?> <UCR_Response> <DocumentHeader> 
 <msgid>OG_UCR_REG</msgid> 
 <refno>UCR201900105262</refno> 
 <msg_func>1</msg_func> 
 <sender>KESWS</sender> 
 <receiver>CIC</receiver> 
 <version>1</version> <docno>For Future Use</docno>
 <docgroup>For Future Use</docgroup> 
 <msgdate>13052019064334</msgdate> 
 </DocumentHeader> <DocumentDetails> 
 <ucr_no>UCR201900105262</ucr_no> <status>VA</status> 
 <ImporterPIN>P000591376W</ImporterPIN> 
 <ImporterName>RYCE EA</ImporterName>
 <ExporterPIN>P000000000N</ExporterPIN> 
 <ExporterName>BS GENERAL</ExporterName> 
 <CustomsEntryNumber> 
 </CustomsEntryNumber> <partshipmentInd>N</partshipmentInd> 
 <parentUCR> </parentUCR> 
 </DocumentDetails> </UCR_Response>

0 个答案:

没有答案