我正在尝试使用 biztalk 中的 xpath - 编排在我的 edifact 文件的最后一个 Line 元素中找到 IMD。这是我的 xpath:
LastLineName = xpath(Message_2,"/*[local-name()='EFACT_D96A_INVOIC' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006']/*[local-name()='LINLoop1' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006']/*[local-name()='IMD_2' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006']/*[local-name()='C273_2' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006']/*[local-name()='C27304' and namespace-uri()='']last()");
这是我的 edifat 文件:
UNB+UNOB:1+BTS-SENDER:ZZZ+RECEIVE-PARTNER:ZZZ+130418:1513+19++++0++0'
UNH+19+INVOIC:D:01B:UN:EAN010'
BGM+380+353795+9'
DTM+171:2013-04-18'
LIN+1++8886419315339:VN'
IMD+++:::Razer Sphex - Full retai'
QTY+47:10'
PRI+AAA:89'
LIN+3++8886419330028:VN'
IMD+++:::Razer Deathadder RESPAWN'
QTY+47:10'
PRI+AAA:347'
LIN+4++8886419330127:VN'
IMD+++:::Razer Abyssus Gaming Mou'
QTY+47:1'
PRI+AAA:242,6'
LIN+5++8886419330660:VN'
IMD+++:::Razer Imperator 2012 Exp'
QTY+47:2'
PRI+AAA:447,5'
LIN+6++8886419311454:VN'
IMD+++:::Razer Lycosa gaming keyb'
QTY+47:2'
PRI+AAA:511,5'
LIN+7++8886419311614:VN'
IMD+++:::Razer Arctosa Silver Key'
QTY+47:2'
PRI+AAA:312'
LIN+10++8886419340317:VN'
IMD+++:::Anansi (MMO Keyboard)'
QTY+47:1'
PRI+AAA:639'
LIN+11++8886419330509:VN'
IMD+++:::Razer Naga - Molten Edit'
QTY+47:2'
PRI+AAA:479,5'
LIN+12++8886419330981:VN'
IMD+++:::Razer Naga Hex MOBA/ Act'
QTY+47:1'
PRI+AAA:479,5'
LIN+13++8886419312277:VN'
IMD+++:::Razer Carcharias Gaming'
QTY+47:2'
PRI+AAA:479,5'
LIN+14++8886419312628:VN'
IMD+++:::Razer Electra headset'
QTY+47:4'
PRI+AAA:383,5'
UNS+S'
MOA+139:790'
UNT+50+19'
UNZ+1+19'
它返回:
有一个无效的令牌