Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 发票中BuyerItemIdentification的OIOUBL命名空间_Xml_Xsd_Edi - Fatal编程技术网

Xml 发票中BuyerItemIdentification的OIOUBL命名空间

Xml 发票中BuyerItemIdentification的OIOUBL命名空间,xml,xsd,edi,Xml,Xsd,Edi,我们的发票号码并不总是与我们的供应商相匹配,因此我添加了BuyerItemIdentification <?xml version="1.0" encoding="utf-8"?> <Invoice xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 UBL-Invoice-2.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-i

我们的发票号码并不总是与我们的供应商相匹配,因此我添加了BuyerItemIdentification

<?xml version="1.0" encoding="utf-8"?>
<Invoice xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 UBL-Invoice-2.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2" xmlns:sdt="urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2">
<cbc:UBLVersionID>2.0</cbc:UBLVersionID>
<cbc:CustomizationID>OIOUBL-2.02</cbc:CustomizationID>
<cbc:ProfileID schemeID="urn:oioubl:id:profileid-1.2" schemeAgencyID="320">urn:www.nesubl.eu:profiles:profile5:ver2.0</cbc:ProfileID>

...

<cac:Item>
    <cbc:Description>Jakke, Allen</cbc:Description>
    <cbc:Name>Clique Jakke, Allen</cbc:Name>
    <cac:SellersItemIdentification>
        <cbc:ID schemeID="n/a">020957-99_L</cbc:ID>
    </cac:SellersItemIdentification>
    <cac:BuyersItemIdentification>
        <cbc:ID schemeID="n/a">JAKKEL</cbc:ID>
    </cac:BuyersItemIdentification>
</cac:Item>

2
OIOUBL-2.02
urn:www.nesubl.eu:profiles:profile5:ver2.0
...
杰克,艾伦
艾伦·雅克集团
020957-99_L
雅克尔
但当我在上验证时,我得到了信息

XmlDocument的结构无效

来源:System.Xml

消息:命名空间“urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”中的元素“Item”在命名空间“urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”中具有无效的子元素“BuyerItemIdentification”。 预期的可能元素列表:“制造商项目标识、标准项目标识、目录标识、附加项目标识、目录文档引用、, 项目规格文档参考、原产国、商品分类、交易条件、危险项目、分类税务类别、附加项目属性、制造商方、信息内容提供者方、原始地址、项目实例 命名空间“urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2”

据我所知,BuyerItemIdentification是项的有效子项。

查看,
cac:BuyerItemIdentification
应该位于
cac:SellerItemIdentification
之前,这就是它无效的原因。我希望,如果它们被交换,它将成功验证

<?xml version="1.0" encoding="utf-8"?>
<Invoice xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 UBL-Invoice-2.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:oasis:names:specification:ubl:schema:xsd:CoreComponentParameters-2" xmlns:sdt="urn:oasis:names:specification:ubl:schema:xsd:SpecializedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2">
<cbc:UBLVersionID>2.0</cbc:UBLVersionID>
<cbc:CustomizationID>OIOUBL-2.02</cbc:CustomizationID>
<cbc:ProfileID schemeID="urn:oioubl:id:profileid-1.2" schemeAgencyID="320">urn:www.nesubl.eu:profiles:profile5:ver2.0</cbc:ProfileID>

...

<cac:Item>
    <cbc:Description>Jakke, Allen</cbc:Description>
    <cbc:Name>Clique Jakke, Allen</cbc:Name>
   <cac:BuyersItemIdentification>
        <cbc:ID schemeID="n/a">JAKKEL</cbc:ID>
    </cac:BuyersItemIdentification>
    <cac:SellersItemIdentification>
        <cbc:ID schemeID="n/a">020957-99_L</cbc:ID>
    </cac:SellersItemIdentification>
</cac:Item>

2
OIOUBL-2.02
urn:www.nesubl.eu:profiles:profile5:ver2.0
...
杰克,艾伦
艾伦·雅克集团
雅克尔
020957-99_L

谢谢,我不知道元素的顺序是否重要,只要保持正确的父/子关系即可。我今天变聪明了。