Avatar billede sbay Nybegynder
30. januar 2007 - 09:45 Der er 5 kommentarer

Import af xml-fil til Notes

Hejsa

Jeg har nulleret lidt rundt for at finde en måde at hente xml-data ind i en Notes-database på!

Jeg har fundet den her løsning, her på eksperten, men den dækker ikke alle mine behov :-)

Sub Initialize
    Dim objXML As Variant
    Set objXML = CreateObject("Microsoft.XMLDOM")
  'Set objXML = CreateObject("Msxml2.DOMDocument40")  virkede ikke
   
    objXML.async = False
    objXML.Load("c:\IBX.xml") 'Hent filnavn
    If (objXML.parseerror.line <> 0) Then
        Messagebox "Linie: " + objXML.parseerror.line + Chr(10) + objXML.parseerror.reason , 0 , "Parse-error"
    Else
        Messagebox objXML.documentElement.nodename, 0 , "TopNode: "
       
        Forall x In objXML.documentElement.childNodes
           
      'nyt dokument kan oprettes her
           
            Messagebox x.nodename + " : " + x.text , 0 , "X Node: " + x.nodetype
           
            Forall y In x.childNodes
        ' felter til dokumentet kan dannes her
                Messagebox y.nodename + " : " + y.text , 0 , "Y Node: " + y.nodetype
               
            End Forall
        End Forall
    End If
End Sub

Jeg vil gerne have hvert "tag" ud i et felt, uden nødvendigvis at skulle skrive agenten med alle tag-navnene (der er vel godt og vel 80 tags!)

En lille finte, er at der i xml-filen, er nogle kontaktoplysninger, hvorefter der godt kan være flere "ordrelinier". Så det mest korrekte er vel at lave et Notesdokument, med tilhørende responses.

En der kan være behjælpelig med at sparke mig igang?
Avatar billede karstenv Nybegynder
30. januar 2007 - 10:02 #1
Jeg lytter/læser lige med her også :-)
Avatar billede sbay Nybegynder
30. januar 2007 - 10:37 #2
Glemte lige at tilføje en eksempelfil - den er laaaaaaaang!

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
<SOAP-ENV:Header>
<eps:endpoints SOAP-ENV:mustUnderstand="1" xmlns:biz="http://schemas.biztalk.org/btf-2-0/address/types"

xmlns:eps="http://schemas.biztalk.org/btf-2-0/endpoints">
<eps:to>
<eps:address xsi:type="biz:OrganizationName">d2e4af8c-7924-1000-abf3-c9a878340001</eps:address>
</eps:to>
<eps:from>
<eps:address xsi:type="biz:OrganizationName">b1d0d350-78ae-1000-a648-c0a878320001</eps:address>
</eps:from>
</eps:endpoints>
<prop:properties SOAP-ENV:mustUnderstand="1" xmlns:prop="http://schemas.biztalk.org/btf-2-0/properties">
<prop:identity>2a8d23a8-9499-c5b6-1105-842e426a5f47</prop:identity>
<prop:sentAt>2007-01-25T10:11:44Z</prop:sentAt>
<prop:expiresAt>2007-01-25T11:11:44Z</prop:expiresAt>
<prop:topic>root:Order</prop:topic>
</prop:properties>
<prc:process SOAP-ENV:mustUnderstand="1" xmlns:prc="http://schemas.biztalk.org/btf-2-0/process">
<prc:type>mml:correlationid</prc:type>
<prc:instance>b1d0d350-78ae-1000-0000-000044398854</prc:instance>
<prc:detail>mmlTxMode=peer-peer;;OriginatingMessageId=b1d0d350-78ae-1000-0000-000044398854;;xCblNamespace=urn:x-com

merceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0</prc:detail>
</prc:process>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<Order>
<OrderHeader>
<OrderNumber>
<BuyerOrderNumber>3000049318</BuyerOrderNumber>
</OrderNumber>
<OrderIssueDate>20070125T11:11:17</OrderIssueDate>
<OrderReferences>
<AccountCode>
<Reference>
<RefNum>non-catalog</RefNum>
</Reference>
</AccountCode>
<OtherOrderReferences>
<ListOfReferenceCoded>
<ReferenceCoded>
<ReferenceTypeCoded>PurchaseOrderNumber</ReferenceTypeCoded>
<PrimaryReference>
<Reference>
<RefNum>3000049318</RefNum>
</Reference>
</PrimaryReference>
</ReferenceCoded>
</ListOfReferenceCoded>
</OtherOrderReferences>
</OrderReferences>
<Purpose>
<PurposeCoded>Original</PurposeCoded>
</Purpose>
<RequestedResponse>
<RequestedResponseCoded>Other</RequestedResponseCoded>
<RequestedResponseCodedOther>Confirmation:Invoice:Expected</RequestedResponseCodedOther>
</RequestedResponse>
<OrderType>
<OrderTypeCoded>SparePartsOrder</OrderTypeCoded>
</OrderType>
<OrderCurrency>
<Currency>
<CurrencyCoded>DKK</CurrencyCoded>
</Currency>
</OrderCurrency>
<OrderLanguage>
<Language>
<LanguageCoded>da</LanguageCoded>
</Language>
</OrderLanguage>
<OrderParty>
<BuyerParty>
<Party>
<PartyID>
<Identifier>
<Agency>
<AgencyCoded>AssignedByBuyerOrBuyersAgent</AgencyCoded>
</Agency>
<Ident>0000000132</Ident>
</Identifier>
</PartyID>
<NameAddress>
<Name1>xxx firma</Name1>
<Street> adresse</Street>
<PostalCode>postnummer</PostalCode>
<City>bynavn</City>
<Country>
<CountryCoded>DK</CountryCoded>
</Country>
</NameAddress>
<OrderContact>
<Contact>
<ContactName>sub firma</ContactName>
<ListOfContactNumber>
<ContactNumber>
<ContactNumberValue>+45 70000000</ContactNumberValue>
<ContactNumberTypeCoded>TelephoneNumber</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>+45 70000000</ContactNumberValue>
<ContactNumberTypeCoded>FaxNumber</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>lf@mailing.cccom</ContactNumberValue>
<ContactNumberTypeCoded>EmailAddress</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>www.firma.ccccom</ContactNumberValue>
<ContactNumberTypeCoded>HomePage</ContactNumberTypeCoded>
</ContactNumber>
</ListOfContactNumber>
</Contact>
</OrderContact>
</Party>
</BuyerParty>
<SellerParty>
<Party>
<PartyID>
<Identifier>
<Agency>
<AgencyCoded>AssignedByBuyerOrBuyersAgent</AgencyCoded>
</Agency>
<Ident>0006417981</Ident>
</Identifier>
</PartyID>
<NameAddress>
<Name1>xxxxxxxxxxx A/S</Name1>
<Street>xxxxxxxxxxx 8</Street>
<PostalCode>xxxxxxxxxx</PostalCode>
<City>xxxxxxxxxxxxxxxxxx</City>
<Country>
<CountryCoded>DK</CountryCoded>
</Country>
</NameAddress>
<OrderContact>
<Contact>
<ContactName>leverandørfirma</ContactName>
<ListOfContactNumber>
<ContactNumber>
<ContactNumberValue>+45 80000000</ContactNumberValue>
<ContactNumberTypeCoded>TelephoneNumber</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>+45800000000000</ContactNumberValue>
<ContactNumberTypeCoded>FaxNumber</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>ib@leverandør.dkkkk</ContactNumberValue>
<ContactNumberTypeCoded>EmailAddress</ContactNumberTypeCoded>
</ContactNumber>
</ListOfContactNumber>
</Contact>
</OrderContact>
</Party>
</SellerParty>
<ShipToParty>
<Party>
<PartyID>
<Identifier>
<Agency>
<AgencyCoded>AssignedByBuyerOrBuyersAgent</AgencyCoded>
</Agency>
<Ident>10920</Ident>
</Identifier>
</PartyID>
<NameAddress>
<Name1>Kundenavn</Name1>
<Name2>Subkundenavn</Name2>
<Street>adresse</Street>
<Building>Port1000</Building>
<PostalCode>postnummer</PostalCode>
<City>by</City>
<Country>
<CountryCoded>DK</CountryCoded>
</Country>
</NameAddress>
<OrderContact>
<Contact>
<ContactName>xxxxxxxxxxx</ContactName>
<ListOfContactNumber>
<ContactNumber>
<ContactNumberValue>+45 73xxxxxxxxx</ContactNumberValue>
<ContactNumberTypeCoded>TelephoneNumber</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>+45 7xxxxxxxxx</ContactNumberValue>
<ContactNumberTypeCoded>FaxNumber</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>lxxxf@xxxxxxxxxx.com</ContactNumberValue>
<ContactNumberTypeCoded>EmailAddress</ContactNumberTypeCoded>
</ContactNumber>
</ListOfContactNumber>
</Contact>
</OrderContact>
<ReceivingContact>
<Contact>
<ContactName>xxxxxxxxxxxxxxxxxx</ContactName>
<ListOfContactNumber>
<ContactNumber>
<ContactNumberValue>+45 xxxxxxxxxxxxx</ContactNumberValue>
<ContactNumberTypeCoded>TelephoneNumber</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>+45 xxxxxxxxxxxxx1</ContactNumberValue>
<ContactNumberTypeCoded>FaxNumber</ContactNumberTypeCoded>
</ContactNumber>
<ContactNumber>
<ContactNumberValue>lxxxxxf@xxxxxxxxxxxxxx.com</ContactNumberValue>
<ContactNumberTypeCoded>EmailAddress</ContactNumberTypeCoded>
</ContactNumber>
</ListOfContactNumber>
</Contact>
</ReceivingContact>
</Party>
</ShipToParty>
<BillToParty>
<Party>
<PartyID>
<Identifier>
<Agency>
<AgencyCoded>AssignedByBuyerOrBuyersAgent</AgencyCoded>
</Agency>
<Ident>0000000004</Ident>
</Identifier>
</PartyID>
<NameAddress>
<Name1>xxxxxxxxxx</Name1>
<Name2>Att.: xxxxxxxxxxxxx Center</Name2>
<Street>xxxxxxxxx</Street>
<PostalCode>xxxxxxxxx</PostalCode>
<City>xxxxxxxxxxxxx</City>
<Country>
<CountryCoded>DK</CountryCoded>
</Country>
</NameAddress>
</Party>
</BillToParty>
</OrderParty>
<OrderTermsOfDelivery>
<TermsOfDelivery>
<TermsOfDeliveryFunctionCoded>DeliveryCondition</TermsOfDeliveryFunctionCoded>
<ShipmentMethodOfPaymentCoded>Other</ShipmentMethodOfPaymentCoded>
<ShipmentMethodOfPaymentCodedOther>xxx</ShipmentMethodOfPaymentCodedOther>
<TermsOfDeliveryDescription>Levering sker i henhold til aftale mellem xxxxxxxxxxx og

leverandør</TermsOfDeliveryDescription>
</TermsOfDelivery>
</OrderTermsOfDelivery>
<OrderPaymentInstructions>
<PaymentInstructions>
<PaymentTerms>
<PaymentTerm>
<PaymentTermCoded>Other</PaymentTermCoded>
<PaymentTermCodedOther>Betingelser i følge aftale mellem xxxxx og leverandør</PaymentTermCodedOther>
</PaymentTerm>
</PaymentTerms>
<PaymentMethod>
<PaymentMeanCoded>Other</PaymentMeanCoded>
<PaymentMeanCodedOther>Betaling i henhold til aftale mellemxxxx og leverandør</PaymentMeanCodedOther>
</PaymentMethod>
</PaymentInstructions>
</OrderPaymentInstructions>
</OrderHeader>
<OrderDetail>
<ListOfItemDetail>
<ItemDetail>
<BaseItemDetail>
<LineItemNum>
<BuyerLineItemNum>00001</BuyerLineItemNum>
</LineItemNum>
<LineItemType>
<LineItemTypeCoded>Item</LineItemTypeCoded>
</LineItemType>
<ItemIdentifiers>
<PartNumbers>
<SellerPartNumber>
<PartNum>
<PartID>U2MMRBAT</PartID>
</PartNum>
</SellerPartNumber>
<OtherItemIdentifiers>
<ListOfProductIdentifierCoded>
<ProductIdentifierCoded>
<ProductIdentifierQualifierCoded>BuyersInternalProductGroupCode</ProductIdentifierQualifierCoded>
<ProductIdentifier>030301000</ProductIdentifier>
</ProductIdentifierCoded>
</ListOfProductIdentifierCoded>
</OtherItemIdentifiers>
</PartNumbers>
<ItemDescription>SER.AMP BATTERY</ItemDescription>
<CommodityCode>
<Identifier>
<Agency>
<AgencyCoded>US-UN-SPSC</AgencyCoded>
</Agency>
<Ident>99999999</Ident>
</Identifier>
</CommodityCode>
</ItemIdentifiers>
<TotalQuantity>
<Quantity>
<QuantityValue>2.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</TotalQuantity>
<OffCatalogFlag>true</OffCatalogFlag>
</BaseItemDetail>
<PricingDetail>
<ListOfPrice>
<Price>
<UnitPrice>
<UnitPriceValue>306.53</UnitPriceValue>
<Currency>
<CurrencyCoded>DKK</CurrencyCoded>
</Currency>
</UnitPrice>
<PriceBasisQuantity>
<Quantity>
<QuantityValue>1</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</PriceBasisQuantity>
</Price>
</ListOfPrice>
</PricingDetail>
<DeliveryDetail>
<ListOfScheduleLine>
<ScheduleLine>
<Quantity>
<QuantityValue>2.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
<RequestedDeliveryDate>20070130T12:00:00</RequestedDeliveryDate>
</ScheduleLine>
</ListOfScheduleLine>
</DeliveryDetail>
<LineItemNote>Skal konteres på 5003 </LineItemNote>
<ListOfStructuredNote>
<StructuredNote>
<GeneralNote>SER.AMP BATTERY</GeneralNote>
<NoteID>Description</NoteID>
<Agency>
<AgencyCoded>Other</AgencyCoded>
<AgencyCodedOther>SAP</AgencyCodedOther>
</Agency>
</StructuredNote>
</ListOfStructuredNote>
</ItemDetail>
<ItemDetail>
<BaseItemDetail>
<LineItemNum>
<BuyerLineItemNum>00002</BuyerLineItemNum>
</LineItemNum>
<LineItemType>
<LineItemTypeCoded>Item</LineItemTypeCoded>
</LineItemType>
<ItemIdentifiers>
<PartNumbers>
<SellerPartNumber>
<PartNum>
<PartID>SE36H00201AB</PartID>
</PartNum>
</SellerPartNumber>
<OtherItemIdentifiers>
<ListOfProductIdentifierCoded>
<ProductIdentifierCoded>
<ProductIdentifierQualifierCoded>BuyersInternalProductGroupCode</ProductIdentifierQualifierCoded>
<ProductIdentifier>030301000</ProductIdentifier>
</ProductIdentifierCoded>
</ListOfProductIdentifierCoded>
</OtherItemIdentifiers>
</PartNumbers>
<ItemDescription>PACKING</ItemDescription>
<CommodityCode>
<Identifier>
<Agency>
<AgencyCoded>US-UN-SPSC</AgencyCoded>
</Agency>
<Ident>99999999</Ident>
</Identifier>
</CommodityCode>
</ItemIdentifiers>
<TotalQuantity>
<Quantity>
<QuantityValue>4.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</TotalQuantity>
<OffCatalogFlag>true</OffCatalogFlag>
</BaseItemDetail>
<PricingDetail>
<ListOfPrice>
<Price>
<UnitPrice>
<UnitPriceValue>319.18</UnitPriceValue>
<Currency>
<CurrencyCoded>DKK</CurrencyCoded>
</Currency>
</UnitPrice>
<PriceBasisQuantity>
<Quantity>
<QuantityValue>1</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</PriceBasisQuantity>
</Price>
</ListOfPrice>
</PricingDetail>
<DeliveryDetail>
<ListOfScheduleLine>
<ScheduleLine>
<Quantity>
<QuantityValue>4.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
<RequestedDeliveryDate>20070130T12:00:00</RequestedDeliveryDate>
</ScheduleLine>
</ListOfScheduleLine>
</DeliveryDetail>
<ListOfStructuredNote>
<StructuredNote>
<GeneralNote>PACKING</GeneralNote>
<NoteID>Description</NoteID>
<Agency>
<AgencyCoded>Other</AgencyCoded>
<AgencyCodedOther>SAP</AgencyCodedOther>
</Agency>
</StructuredNote>
</ListOfStructuredNote>
</ItemDetail>
<ItemDetail>
<BaseItemDetail>
<LineItemNum>
<BuyerLineItemNum>00003</BuyerLineItemNum>
</LineItemNum>
<LineItemType>
<LineItemTypeCoded>Item</LineItemTypeCoded>
</LineItemType>
<ItemIdentifiers>
<PartNumbers>
<SellerPartNumber>
<PartNum>
<PartID>SE10E00501AA</PartID>
</PartNum>
</SellerPartNumber>
<OtherItemIdentifiers>
<ListOfProductIdentifierCoded>
<ProductIdentifierCoded>
<ProductIdentifierQualifierCoded>BuyersInternalProductGroupCode</ProductIdentifierQualifierCoded>
<ProductIdentifier>030301000</ProductIdentifier>
</ProductIdentifierCoded>
</ListOfProductIdentifierCoded>
</OtherItemIdentifiers>
</PartNumbers>
<ItemDescription>SPACER</ItemDescription>
<CommodityCode>
<Identifier>
<Agency>
<AgencyCoded>US-UN-SPSC</AgencyCoded>
</Agency>
<Ident>99999999</Ident>
</Identifier>
</CommodityCode>
</ItemIdentifiers>
<TotalQuantity>
<Quantity>
<QuantityValue>4.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</TotalQuantity>
<OffCatalogFlag>true</OffCatalogFlag>
</BaseItemDetail>
<PricingDetail>
<ListOfPrice>
<Price>
<UnitPrice>
<UnitPriceValue>187.01</UnitPriceValue>
<Currency>
<CurrencyCoded>DKK</CurrencyCoded>
</Currency>
</UnitPrice>
<PriceBasisQuantity>
<Quantity>
<QuantityValue>1</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</PriceBasisQuantity>
</Price>
</ListOfPrice>
</PricingDetail>
<DeliveryDetail>
<ListOfScheduleLine>
<ScheduleLine>
<Quantity>
<QuantityValue>4.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
<RequestedDeliveryDate>20070130T12:00:00</RequestedDeliveryDate>
</ScheduleLine>
</ListOfScheduleLine>
</DeliveryDetail>
<ListOfStructuredNote>
<StructuredNote>
<GeneralNote>SPACER</GeneralNote>
<NoteID>Description</NoteID>
<Agency>
<AgencyCoded>Other</AgencyCoded>
<AgencyCodedOther>SAP</AgencyCodedOther>
</Agency>
</StructuredNote>
</ListOfStructuredNote>
</ItemDetail>
<ItemDetail>
<BaseItemDetail>
<LineItemNum>
<BuyerLineItemNum>00004</BuyerLineItemNum>
</LineItemNum>
<LineItemType>
<LineItemTypeCoded>Item</LineItemTypeCoded>
</LineItemType>
<ItemIdentifiers>
<PartNumbers>
<SellerPartNumber>
<PartNum>
<PartID>VRE319633</PartID>
</PartNum>
</SellerPartNumber>
<OtherItemIdentifiers>
<ListOfProductIdentifierCoded>
<ProductIdentifierCoded>
<ProductIdentifierQualifierCoded>BuyersInternalProductGroupCode</ProductIdentifierQualifierCoded>
<ProductIdentifier>030301000</ProductIdentifier>
</ProductIdentifierCoded>
</ListOfProductIdentifierCoded>
</OtherItemIdentifiers>
</PartNumbers>
<ItemDescription>LIGHT BULB</ItemDescription>
<CommodityCode>
<Identifier>
<Agency>
<AgencyCoded>US-UN-SPSC</AgencyCoded>
</Agency>
<Ident>99999999</Ident>
</Identifier>
</CommodityCode>
</ItemIdentifiers>
<TotalQuantity>
<Quantity>
<QuantityValue>10.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</TotalQuantity>
<OffCatalogFlag>true</OffCatalogFlag>
</BaseItemDetail>
<PricingDetail>
<ListOfPrice>
<Price>
<UnitPrice>
<UnitPriceValue>19.68</UnitPriceValue>
<Currency>
<CurrencyCoded>DKK</CurrencyCoded>
</Currency>
</UnitPrice>
<PriceBasisQuantity>
<Quantity>
<QuantityValue>1</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</PriceBasisQuantity>
</Price>
</ListOfPrice>
</PricingDetail>
<DeliveryDetail>
<ListOfScheduleLine>
<ScheduleLine>
<Quantity>
<QuantityValue>10.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
<RequestedDeliveryDate>20070130T12:00:00</RequestedDeliveryDate>
</ScheduleLine>
</ListOfScheduleLine>
</DeliveryDetail>
<ListOfStructuredNote>
<StructuredNote>
<GeneralNote>LIGHT BULB</GeneralNote>
<NoteID>Description</NoteID>
<Agency>
<AgencyCoded>Other</AgencyCoded>
<AgencyCodedOther>SAP</AgencyCodedOther>
</Agency>
</StructuredNote>
</ListOfStructuredNote>
</ItemDetail>
<ItemDetail>
<BaseItemDetail>
<LineItemNum>
<BuyerLineItemNum>00005</BuyerLineItemNum>
</LineItemNum>
<LineItemType>
<LineItemTypeCoded>Item</LineItemTypeCoded>
</LineItemType>
<ItemIdentifiers>
<PartNumbers>
<SellerPartNumber>
<PartNum>
<PartID>MISC-251920A</PartID>
</PartNum>
</SellerPartNumber>
<OtherItemIdentifiers>
<ListOfProductIdentifierCoded>
<ProductIdentifierCoded>
<ProductIdentifierQualifierCoded>BuyersInternalProductGroupCode</ProductIdentifierQualifierCoded>
<ProductIdentifier>030301000</ProductIdentifier>
</ProductIdentifierCoded>
</ListOfProductIdentifierCoded>
</OtherItemIdentifiers>
</PartNumbers>
<ItemDescription>RUBBER NOZZLE</ItemDescription>
<CommodityCode>
<Identifier>
<Agency>
<AgencyCoded>US-UN-SPSC</AgencyCoded>
</Agency>
<Ident>99999999</Ident>
</Identifier>
</CommodityCode>
</ItemIdentifiers>
<TotalQuantity>
<Quantity>
<QuantityValue>10.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</TotalQuantity>
<OffCatalogFlag>true</OffCatalogFlag>
</BaseItemDetail>
<PricingDetail>
<ListOfPrice>
<Price>
<UnitPrice>
<UnitPriceValue>123.26</UnitPriceValue>
<Currency>
<CurrencyCoded>DKK</CurrencyCoded>
</Currency>
</UnitPrice>
<PriceBasisQuantity>
<Quantity>
<QuantityValue>1</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</PriceBasisQuantity>
</Price>
</ListOfPrice>
</PricingDetail>
<DeliveryDetail>
<ListOfScheduleLine>
<ScheduleLine>
<Quantity>
<QuantityValue>10.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
<RequestedDeliveryDate>20070130T12:00:00</RequestedDeliveryDate>
</ScheduleLine>
</ListOfScheduleLine>
</DeliveryDetail>
<ListOfStructuredNote>
<StructuredNote>
<GeneralNote>RUBBER NOZZLE</GeneralNote>
<NoteID>Description</NoteID>
<Agency>
<AgencyCoded>Other</AgencyCoded>
<AgencyCodedOther>SAP</AgencyCodedOther>
</Agency>
</StructuredNote>
</ListOfStructuredNote>
</ItemDetail>
<ItemDetail>
<BaseItemDetail>
<LineItemNum>
<BuyerLineItemNum>00006</BuyerLineItemNum>
</LineItemNum>
<LineItemType>
<LineItemTypeCoded>Item</LineItemTypeCoded>
</LineItemType>
<ItemIdentifiers>
<PartNumbers>
<SellerPartNumber>
<PartNum>
<PartID>SBOSHS38-S</PartID>
</PartNum>
</SellerPartNumber>
<OtherItemIdentifiers>
<ListOfProductIdentifierCoded>
<ProductIdentifierCoded>
<ProductIdentifierQualifierCoded>BuyersInternalProductGroupCode</ProductIdentifierQualifierCoded>
<ProductIdentifier>030301000</ProductIdentifier>
</ProductIdentifierCoded>
</ListOfProductIdentifierCoded>
</OtherItemIdentifiers>
</PartNumbers>
<ItemDescription>GASKET</ItemDescription>
<CommodityCode>
<Identifier>
<Agency>
<AgencyCoded>US-UN-SPSC</AgencyCoded>
</Agency>
<Ident>99999999</Ident>
</Identifier>
</CommodityCode>
</ItemIdentifiers>
<TotalQuantity>
<Quantity>
<QuantityValue>10.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</TotalQuantity>
<OffCatalogFlag>true</OffCatalogFlag>
</BaseItemDetail>
<PricingDetail>
<ListOfPrice>
<Price>
<UnitPrice>
<UnitPriceValue>41.67</UnitPriceValue>
<Currency>
<CurrencyCoded>DKK</CurrencyCoded>
</Currency>
</UnitPrice>
<PriceBasisQuantity>
<Quantity>
<QuantityValue>1</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
</PriceBasisQuantity>
</Price>
</ListOfPrice>
</PricingDetail>
<DeliveryDetail>
<ListOfScheduleLine>
<ScheduleLine>
<Quantity>
<QuantityValue>10.000</QuantityValue>
<UnitOfMeasurement>
<UOMCoded>Other</UOMCoded>
<UOMCodedOther>PCE</UOMCodedOther>
</UnitOfMeasurement>
</Quantity>
<RequestedDeliveryDate>20070130T12:00:00</RequestedDeliveryDate>
</ScheduleLine>
</ListOfScheduleLine>
</DeliveryDetail>
<ListOfStructuredNote>
<StructuredNote>
<GeneralNote>GASKET</GeneralNote>
<NoteID>Description</NoteID>
<Agency>
<AgencyCoded>Other</AgencyCoded>
<AgencyCodedOther>SAP</AgencyCodedOther>
</Agency>
</StructuredNote>
</ListOfStructuredNote>
</ItemDetail>
</ListOfItemDetail>
</OrderDetail>
<OrderSummary>
<NumberOfLines>6</NumberOfLines>
<TotalAmount>
<MonetaryValue>
<MonetaryAmount>4483.92</MonetaryAmount>
</MonetaryValue>
</TotalAmount>
</OrderSummary>
</Order></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Avatar billede jogii Nybegynder
03. februar 2007 - 19:18 #3
hvad er problemet? Virker koden ikke?
Avatar billede jogii Nybegynder
03. februar 2007 - 21:34 #4
Nu har jeg tilføjet et 3. niveau i traverseringen.
Du kan ikke blot importere alt det her råt.
XML er noget hø hvis man bare tager det som det er.
Det bedste du kan gøre er at lave en eller anden XLT transformering, så du kun får de data ud, som du er interesseret i. De transformerede data er så meget nemmere at importere "råt" (altså med sådan en generisk kode som her)

    Dim objXML As Variant
    Set objXML = CreateObject("Microsoft.XMLDOM")
  'Set objXML = CreateObject("Msxml2.DOMDocument40")  virkede ikke
   
    objXML.async = False
    objXML.Load("c:\test\test.xml") 'Hent filnavn
    If (objXML.parseerror.line <> 0) Then
        Messagebox "Linie: " + objXML.parseerror.line + Chr(10) + objXML.parseerror.reason , 0 , "Parse-error"
    Else
        Messagebox objXML.documentElement.nodename, 0 , "TopNode: "
       
        Forall x In objXML.documentElement.childNodes
           
      'nyt dokument kan oprettes her
           
            Messagebox x.nodename + " : " + x.text , 0 , "X Node: " + x.nodetype
           
            Forall y In x.childNodes
        ' felter til dokumentet kan dannes her
                Messagebox y.nodename + " : " + y.text , 0 , "Y Node: " + y.nodetype
               
                Forall z In y.childNodes
                    Messagebox z.nodename + " : " + z.text , 0 , "Z Node: " + z.nodetype
                End Forall
               
               
            End Forall
        End Forall
    End If
Avatar billede sbay Nybegynder
04. juli 2007 - 14:42 #5
jogii - smid et svar. Vi droppede ideen i denne omgang! Kan være vi tager det op når der bliver mere tid :-)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Computerworld tilbyder specialiserede kurser i database-management

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester