ich brauche mal wieder einen anschubser.
Ich habe eine mit xmlns strukturierte XML Datei, weiß aber gerade nicht wie ich die per InsertXMLStructure() in die passende Struktur einlesen kann.
Auch der Import der Attribute ist mir gerade nicht eingänging.
Hintergrund: Ich möchte die ab 2025 verpflichtenden E-Rechnungen einlesen und weiter verarbeiten können
Beispiel XML (snippet, nicht vollständig!)
Code: Alles auswählen
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:UBLVersionID>2.1</cbc:UBLVersionID>
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0#conformant#urn:xeinkauf.de:kosit:extension:xrechnung_3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>12345</cbc:ID>
<cbc:IssueDate>2024-04-24</cbc:IssueDate>
<cbc:DueDate>2024-05-01</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>Vielen Dank für Ihre Auftrag</cbc:Note>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>Wie bestellt liefern wir Ihnen </cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>Vielen Dank für Ihre Auftrag</cbc:ID>
</cac:OrderReference>
<cac:AdditionalDocumentReference>
<cbc:ID>R12345</cbc:ID>
<cbc:DocumentDescription>Vielen Dank für Ihre Auftrag</cbc:DocumentDescription>
</cac:AdditionalDocumentReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">info@mymailadress.de</cbc:EndpointID>
<cac:PostalAddress>
<cbc:StreetName>Musterstr. 1</cbc:StreetName>
<cbc:CityName>Musterstadt</cbc:CityName>
<cbc:PostalZone>12345</cbc:PostalZone>
<cbc:CountrySubentity>Hessen</cbc:CountrySubentity>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>DE123456789</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>MyCompanyName</cbc:RegistrationName>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>MyPersonalName</cbc:Name>
<cbc:Telephone>123456789</cbc:Telephone>
<cbc:ElectronicMail>info@mymailadress.de</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
...
</invoice>
Code: Alles auswählen
structure xinvoice
invoice.s
cbc:ProfileID.s ; <--- funktioniert wegen des : nicht
EndStructure
Danke schon mal für hilfreiche Kommentare