All, Jeffrey's suggested fix solved my issue. Thanks for the help!
-- Corey -----Original Message----- From: Jeffrey Rodriguez [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2003 3:28 PM To: [EMAIL PROTECTED] Subject: Re: Difficulty parsing UCCnet 2.2 XML Hi Corey, Yes you are right the parser thinks it is validating using a dtd. You should add the following: dbf.setAttribute( "http://apache.org/xml/features/validation/schema", new Boolean(true) ); I tested this with the current build of xerces but you should be able to trye it with 2.5.0. You XML file is valid. Regards, Jeffrey Rodriguez Silicon Valley >From: "Sanders, Corey" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> >Subject: Difficulty parsing UCCnet 2.2 XML >Date: Mon, 15 Sep 2003 11:21:14 -0400 > > >I am having trouble validating a UCCnet 2.2 XML document using Xerces. The >document validates fine under XMLSpy 4.4, but I am receive validation >errors >both with Xerces 1.4.4 and Xerces 2.5.0. See below for a sample instance >document, a snippet of code showing my parser invocation, and the output >from both parsers. > >Your help is very much appreciated here. UCCnet's helpdesk wasn't willing >to >help with "code related issues." > >--------------------------------------------------- >SAMPLE INSTANCE DOCUMENT >--------------------------------------------------- > ><?xml version="1.0" encoding="UTF-8" standalone="yes"?> ><uccnet:envelope xmlns:uccnet="http://www.uccnet.org/schemas/2.2/uccnet" >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >xmlns:eanucc="http://www.ean-ucc.org/schemas/1.3/eanucc" >xmlns:hardlines="http://www.uccnet.org/schemas/1.3/hardlines" >communicationVersion="2.2" >xsi:schemaLocation="http://www.uccnet.org/schemas/2.2/uccnet >http://test.uccnet.org/xmlschema/uccnet/2.2/Envelope.xsd"> > <messageHeader> > <to> > <globalLocationNumber> > <gln>0614141800001</gln> > </globalLocationNumber> > </to> > <from> > <globalLocationNumber> > <gln>1111111111116</gln> > </globalLocationNumber> > </from> > <messageIdentifier> > <value>will-be-replaced</value> > </messageIdentifier> > <userId>user</userId> > <representingParty> > <gln>1111111111116</gln> > </representingParty> > </messageHeader> > <body> > <transaction> > <entityIdentification> > ><uniqueCreatorIdentification>will-be-replaced</uniqueCreatorIdentification> > <globalLocationNumber> > <gln>1111111111116</gln> > </globalLocationNumber> > </entityIdentification> > <command> > <uccnet:notifyCommand> > <notifyCommandHeader> > <entityIdentification> > ><uniqueCreatorIdentification>will-be-replaced</uniqueCreatorIdentification> > ><globalLocationNumber> > ><gln>1111111111116</gln> > ></globalLocationNumber> > </entityIdentification> > </notifyCommandHeader> > <notifyCommandOperand> > ><eanucc:catalogueItemNotification isReload="false" >creationDate="2003-09-10T08:39:10" documentStatus="ORIGINAL" >xsi:type="uccnet:CatalogueItemNotificationType"> > <catalogueItem> > ><catalogueItemState state="IN_PROGRESS" >discontinueDate="2003-08-22T12:00:00" cancelDate="2003-09-30T12:00:00"/> > <tradeItem >xsi:type="hardlines:HardlinesTradeItemType"> > ><tradeItemUnitDescriptor>CASE</tradeItemUnitDescriptor> > ><tradeItemIdentification> > ><gtin>08772290000054</gtin> > ><additionalTradeItemIdentification >xsi:type="uccnet:AlternateTradeItemIdentificationType"> > ><uccnet:eanuccType>UK</uccnet:eanuccType> > ><uccnet:eanuccCode>08772290000054</uccnet:eanuccCode> > ></additionalTradeItemIdentification> > ></tradeItemIdentification> > <!-- > ><replacedTradeItemIdentification> > ><gtin>00006096240018</gtin> > ><additionalTradeItemIdentification >xsi:type="uccnet:AlternateTradeItemIdentificationType"> > ><uccnet:eanuccType>UK</uccnet:eanuccType> > ><uccnet:eanuccCode>566</uccnet:eanuccCode> > ></additionalTradeItemIdentification> > ></replacedTradeItemIdentification> > --> > ><tradeItemInformation> > ><allowanceCharge allowanceChargeType="LUMP_SUM" sequenceNumber="99" >allowanceOrChargeType="ALLOWANCE" settlementType="OFF_INVOICE" >effectiveDateType="LAST_ARRIVAL_DATE"> > ><allowanceChargePriceBracket> > ><bracketIdentifier>B5</bracketIdentifier> > ></allowanceChargePriceBracket> > ><monetaryAmountOrPercentage> > ><amount currencyISOCode="USD">15.99</amount> > ></monetaryAmountOrPercentage> > ><baseAmount> > ><amount currencyISOCode="USD">15.99</amount> > ></baseAmount> > ></allowanceCharge> > ><informationProviderOfTradeItem> > ><informationProvider> > ><gln>1111111111116</gln> > ><additionalPartyIdentification type="DUNS">Content >Type</additionalPartyIdentification> > ></informationProvider> > ><nameOfInformationProvider>Sterling Commerce</nameOfInformationProvider> > ></informationProviderOfTradeItem> > ><paymentTerms paymentTermsType="DISCOUNT" >paymentTermsEvent="DATE_OF_DELIVERY_TO_SITE"> > ><netPayment> > ><paymentTimePeriod> > ><timePeriodDue timePeriod="DAYS"> > ><value>60</value> > ></timePeriodDue> > ></paymentTimePeriod> > ></netPayment> > ><installmentDue> > ><percentageOfPaymentDue>15</percentageOfPaymentDue> > ><paymentTimePeriod> > ><timePeriodDue timePeriod="DAYS"> > ><value>30</value> > ></timePeriodDue> > ></paymentTimePeriod> > ></installmentDue> > ><discountPayment discountType="45"> > ><discountDescription> > ><description language="us"> > ><text>discount desc</text> > ></description> > ></discountDescription> > ><paymentTimePeriod> > ><timePeriodDue timePeriod="DAYS"> > ><value>45</value> > ></timePeriodDue> > ></paymentTimePeriod> > ></discountPayment> > ><proximoCutOffDay> > ><value>100</value> > ></proximoCutOffDay> > ></paymentTerms> > ><targetMarketInformation> > ><targetMarketCountryCode>840</targetMarketCountryCode> > ><targetMarketDescription language="us"> > ><text>United States</text> > ></targetMarketDescription> > ></targetMarketInformation> > ><classificationCategoryCode> > ><classificationCategoryCode>1416052592</classificationCategoryCode> > ><classificationCategoryDefinition>NOTIFY</classificationCategoryDefinition> > ><classificationCategoryName>NOTIFY</classificationCategoryName> > ><additionalClassification> > ><additionalClassificationAgencyName>UDEX</additionalClassificationAgencyNam e > > > ><additionalClassificationCategoryCode>02.0037.0135</additionalClassificatio n >CategoryCode> > ><additionalClassificationCategoryDescription>Paper >Plates</additionalClassificationCategoryDescription> > ></additionalClassification> > ><eANUCCTradeItemClassification> > ><eANUCCClassificationAttributeTypeCode>2000212</eANUCCClassificationAttribu t >eTypeCode> > ><eANUCCClassificationAttributeTypeName>Heavy >Duty</eANUCCClassificationAttributeTypeName> > ><eANUCCClassificationAttributeTypeDefinition>Heavy >duty</eANUCCClassificationAttributeTypeDefinition> > ><eANUCCTradeItemClassificationValue> > ><eANUCCClassificationAttributeValueCode>92505488</eANUCCClassificationAttri b >uteValueCode> > ><eANUCCClassificationAttributeValueName>class attribute value name >2</eANUCCClassificationAttributeValueName> > ></eANUCCTradeItemClassificationValue> > ></eANUCCTradeItemClassification> > ></classificationCategoryCode> > ><tradeItemDescriptionInformation> > ><brandName>Chinette</brandName> > ><descriptionShort> > ><description language="us"> > ><text>Heavy Duty Paper Plates</text> > ></description> > ></descriptionShort> > ><functionalName> > ><description language="us"> > ><text>Chinette Paper Plates</text> > ></description> > ></functionalName> > ><tradeItemDescription> > ><longDescription language="us"> > ><longText>100 count</longText> > ></longDescription> > ></tradeItemDescription> > ><additionalTradeItemDescription> > ><longDescription language="us"> > ><longText>Flower pattern</longText> > ></longDescription> > ></additionalTradeItemDescription> > ><invoiceName> > ><description language="us"> > ><text>Invoice</text> > ></description> > ></invoiceName> > ><productRange>What goes here</productRange> > ><subBrand>Generic</subBrand> > ><tradeItemGroupIdentificationCode>006096240018</tradeItemGroupIdentificatio n >Code> > ><tradeItemGroupIdentificationDescription> > ><description language="us"> > ><text>TI Group ID Description</text> > ></description> > ></tradeItemGroupIdentificationDescription> > ><tradeItemFormDescription>Trade Item Form Description >2</tradeItemFormDescription> > ><variant> > ><description language="us"> > ><text>5%</text> > ></description> > ></variant> > ></tradeItemDescriptionInformation> > ><tradingPartnerNeutralTradeItemInformation> > ><tradeItemUnitIndicator> > ><isTradeItemABaseUnit>true</isTradeItemABaseUnit> > ><isTradeItemAConsumerUnit>true</isTradeItemAConsumerUnit> > ><isTradeItemADespatchUnit>false</isTradeItemADespatchUnit> > ><isTradeItemAnInvoiceUnit>true</isTradeItemAnInvoiceUnit> > ><isTradeItemAnOrderableUnit>true</isTradeItemAnOrderableUnit> > ><isTradeItemAVariableUnit>true</isTradeItemAVariableUnit> > ></tradeItemUnitIndicator> > ><brandOwnerOfTradeItem> > ><brandOwner> > ><gln>1111111111116</gln> > ><additionalPartyIdentification >type="DUNS">DEA_DRUG_ENFORCEMENT_AGENCY</additionalPartyIdentification> > ></brandOwner> > ><nameOfBrandOwner>Sterling Commerce</nameOfBrandOwner> > ></brandOwnerOfTradeItem> > ><manufacturerOfTradeItem> > ><manufacturer> > ><gln>1111111111116</gln> > ><additionalPartyIdentification >type="DUNS">SCAC</additionalPartyIdentification> > ></manufacturer> > ><nameOfManufacturer>ABC Pharmacy</nameOfManufacturer> > ></manufacturerOfTradeItem> > ><materialSafetyData> > ><materialSafetyDataSheetNumber>62626266</materialSafetyDataSheetNumber> > ></materialSafetyData> > ><organicTradeItemCharacteristics> > ><organicClaimAgency>Agency of Organic Claims</organicClaimAgency> > ><organicTradeItemCode>566875</organicTradeItemCode> > ></organicTradeItemCharacteristics> > ><packagingMarking> > ><isPackagingMarkedAsRecyclable>true</isPackagingMarkedAsRecyclable> > ><isPackagingMarkedReturnable>false</isPackagingMarkedReturnable> > ><isPackagingMarkedWithExpirationDate>false</isPackagingMarkedWithExpiration D >ate> > ><isPackagingMarkedWithGreenDot>false</isPackagingMarkedWithGreenDot> > ><isPackagingMarkedWithIngredients>false</isPackagingMarkedWithIngredients> > ></packagingMarking> > ><packagingMaterial> > ><packagingMaterialCode>PA</packagingMaterialCode> > ><packagingMaterialCodeListMaintenanceAgency>MAINT >AGENCY</packagingMaterialCodeListMaintenanceAgency> > ><packagingMaterialCompositionQuantity> > ><measurementValue unitOfMeasure="LB">15</measurementValue> > ></packagingMaterialCompositionQuantity> > ><packagingMaterialDescription> > ><description language="us"> > ><text>Bubble Wrap</text> > ></description> > ></packagingMaterialDescription> > ><packagingTermsAndCondition>rop</packagingTermsAndCondition> > ></packagingMaterial> > ><packagingType> > ><packagingTypeCode>PAC</packagingTypeCode> > ><packagingTypeDescription>Box</packagingTypeDescription> > ></packagingType> > ><tradeItemColorDescription> > ><colorCodeListAgency>CRA</colorCodeListAgency> > ><colorCodeValue>Black</colorCodeValue> > ><colorDescription> > ><description language="us"> > ><text>Darkest Black</text> > ></description> > ></colorDescription> > ></tradeItemColorDescription> > ><tradeItemCountryOfOrigin> > ><countryOfOrigin>us</countryOfOrigin> > ></tradeItemCountryOfOrigin> > ><tradeItemCoupon> > ><couponFamilyCode>85</couponFamilyCode> > ></tradeItemCoupon> > ><tradeItemDateInformation> > ><effectiveDate>2003-08-24</effectiveDate> > ><lastChangeDateTime>2003-08-22T14:22:02</lastChangeDateTime> > ><publicationDate>2003-08-12</publicationDate> > ><startAvailabilityDateTime>2003-08-22T14:22:02</startAvailabilityDateTime> > ><canceledDate>2003-09-30</canceledDate> > ><consumerAvailabilityDateTime>2003-09-30T15:15:15</consumerAvailabilityDate T >ime> > ><discontinuedDate>2003-08-22</discontinuedDate> > ><endAvailabilityDateTime>2003-08-22T14:22:02</endAvailabilityDateTime> > ></tradeItemDateInformation> > ><tradeItemHandlingInformation> > ><handlingInstructionsCode> > ><description language="us"> > ><text>HWC</text> > ></description> > ></handlingInstructionsCode> > ><minimumTradeItemLifespanFromTimeOfArrival>360</minimumTradeItemLifespanFro m >TimeOfArrival> > ><stackingFactor>25</stackingFactor> > ><stackingWeightMaximum> > ><measurementValue unitOfMeasure="kg">15</measurementValue> > ></stackingWeightMaximum> > ></tradeItemHandlingInformation> > ><tradeItemHazardousInformation> > ><classOfDangerousGoods>A2</classOfDangerousGoods> > ><dangerousGoodsAMarginNumber>NOT POSSIBLE</dangerousGoodsAMarginNumber> > ><dangerousGoodsHazardousCode>123</dangerousGoodsHazardousCode> > ><dangerousGoodsPackingGroup>Group 2</dangerousGoodsPackingGroup> > ><dangerousGoodsRegulationCode>US55</dangerousGoodsRegulationCode> > ><dangerousGoodsShippingName>Fuel</dangerousGoodsShippingName> > ><dangerousGoodsTechnicalName> > ><longDescription language="us"> > ><longText>GASOLINE</longText> > ></longDescription> > ></dangerousGoodsTechnicalName> > ><flashPointTemperature> > ><measurementValue unitOfMeasure="Fah">120</measurementValue> > ></flashPointTemperature> > ><unitedNationsDangerousGoodsNumber>5520</unitedNationsDangerousGoodsNumber> > ></tradeItemHazardousInformation> > ><tradeItemHierarchy> > ><quantityOfCompleteLayersContainedInATradeItem>100</quantityOfCompleteLayer s >ContainedInATradeItem> > ><quantityOfLayersPerPallet>200</quantityOfLayersPerPallet> > ><quantityOfTradeItemsContainedInACompleteLayer>100</quantityOfTradeItemsCon t >ainedInACompleteLayer> > ><quantityOfTradeItemsPerPallet>200000</quantityOfTradeItemsPerPallet> > ><quantityOfTradeItemsPerPalletLayer>100</quantityOfTradeItemsPerPalletLayer > > ><quantityOfInnerPack>10</quantityOfInnerPack> > ><quantityOfNextLevelTradeItemWithinInnerPack>0</quantityOfNextLevelTradeIte m >WithinInnerPack> > ></tradeItemHierarchy> > ><tradeItemMarking> > ><hasBatchNumber>false</hasBatchNumber> > ><isNonSoldTradeItemReturnable>false</isNonSoldTradeItemReturnable> > ><isTradeItemMarkedAsRecyclable>false</isTradeItemMarkedAsRecyclable> > ></tradeItemMarking> > ><tradeItemMeasurements> > ><depth> > ><measurementValue unitOfMeasure="IN">1</measurementValue> > ></depth> > ><grossWeight> > ><measurementValue unitOfMeasure="KG">35</measurementValue> > ></grossWeight> > ><height> > ><measurementValue unitOfMeasure="IN">6</measurementValue> > ></height> > ><isNetContentDeclarationIndicated>false</isNetContentDeclarationIndicated> > ><width> > ><measurementValue unitOfMeasure="IN">6</measurementValue> > ></width> > ><diameter> > ><measurementValue unitOfMeasure="IN">10</measurementValue> > ></diameter> > ><drainedWeight> > ><measurementValue unitOfMeasure="OZ">1</measurementValue> > ></drainedWeight> > ><genericIngredient>GEN INGRED 2</genericIngredient> > ><genericIngredientStrength> > ><measurementValue unitOfMeasure="LB">6</measurementValue> > ></genericIngredientStrength> > ><ingredientStrength>0.5</ingredientStrength> > ><netContent> > ><measurementValue unitOfMeasure="BG">15</measurementValue> > ></netContent> > ><netWeight> > ><measurementValue unitOfMeasure="KG">35</measurementValue> > ></netWeight> > ><pegHorizontal> > ><measurementValue unitOfMeasure="IN">45</measurementValue> > ></pegHorizontal> > ><pegVertical> > ><measurementValue unitOfMeasure="IN">16.5</measurementValue> > ></pegVertical> > ></tradeItemMeasurements> > ><tradeItemOrderInformation> > ><orderingLeadTime unitOfMeasure="yr">2</orderingLeadTime> > ><orderQuantityMaximum>100</orderQuantityMaximum> > ><orderQuantityMinimum>1</orderQuantityMinimum> > ><orderQuantityMultiple>5</orderQuantityMultiple> > ><orderSizingFactor> > ><measurementValue unitOfMeasure="OZ">35</measurementValue> > ></orderSizingFactor> > ></tradeItemOrderInformation> > ><tradeItemPalletInformation> > ><palletTypeCode>44</palletTypeCode> > ><palletTermsAndConditions>AB</palletTermsAndConditions> > ></tradeItemPalletInformation> > ><cataloguePrice> > ><effectiveStartDate>2004-01-01</effectiveStartDate> > ><value currencyISOCode="USD">15.00</value> > ><effectiveEndDate>2004-01-01</effectiveEndDate> > ></cataloguePrice> > ><suggestedRetailPrice> > ><effectiveStartDate>2004-01-01</effectiveStartDate> > ><value currencyISOCode="USD">15.00</value> > ><effectiveEndDate>2005-01-01</effectiveEndDate> > ></suggestedRetailPrice> > ><tradeItemSizeDescription> > ><sizeCodeListAgency>Siz</sizeCodeListAgency> > ><sizeCodeValue>6</sizeCodeValue> > ><descriptiveSize language="us"> > ><text>small</text> > ></descriptiveSize> > ></tradeItemSizeDescription> > ><tradeItemTaxInformation> > ><tradeItemTaxAmount> > ><taxAmount currencyISOCode="USD">1.00</taxAmount> > ><taxAgency> > ><taxAgencyCode>X2</taxAgencyCode> > ><taxTypeCode>30</taxTypeCode> > ><taxTypeDescription>This is Automatically generated.</taxTypeDescription> > ></taxAgency> > ></tradeItemTaxAmount> > > > ></tradeItemTaxInformation> > ><tradeItemTemperatureInformation> > ><deliveryToDistributionCenterTemperatureMaximum> > ><measurementValue unitOfMeasure="DEG">100</measurementValue> > ></deliveryToDistributionCenterTemperatureMaximum> > ><deliveryToDistributionCenterTemperatureMinimum> > ><measurementValue unitOfMeasure="DEG">0</measurementValue> > ></deliveryToDistributionCenterTemperatureMinimum> > ><deliveryToMarketTemperatureMaximum> > ><measurementValue unitOfMeasure="DEG">10</measurementValue> > ></deliveryToMarketTemperatureMaximum> > ><deliveryToMarketTemperatureMinimum> > ><measurementValue unitOfMeasure="DEG">15</measurementValue> > ></deliveryToMarketTemperatureMinimum> > ><storageHandlingTemperatureMaximum> > ><measurementValue unitOfMeasure="DEG">20</measurementValue> > ></storageHandlingTemperatureMaximum> > ><storageHandlingTemperatureMinimum> > ><measurementValue unitOfMeasure="DEG">15</measurementValue> > ></storageHandlingTemperatureMinimum> > ></tradeItemTemperatureInformation> > ></tradingPartnerNeutralTradeItemInformation> > ></tradeItemInformation> > ><hardlines:tradeItemHarmonizedSystemIdentification> > ><hardlines:harmonizedTariffSystemIdentificationCode>99999999</hardlines:har m >onizedTariffSystemIdentificationCode> > ></hardlines:tradeItemHarmonizedSystemIdentification> > ><hardlines:packagingWeight> > ><measurementValue unitOfMeasure="KG">10</measurementValue> > ></hardlines:packagingWeight> > ><hardlines:piecesPerTradeItem> > ><measurementValue unitOfMeasure="EA">10</measurementValue> > ></hardlines:piecesPerTradeItem> > ><hardlines:rightOfReturnForNonSoldTradeItems> > ><hardlines:returnGoodsPolicy> > ><description language="en"> > ><text>No Returns</text> > ></description> > ></hardlines:returnGoodsPolicy> > ></hardlines:rightOfReturnForNonSoldTradeItems> > ><hardlines:warrantyIndicator> > ><hardlines:warrantyDescription> > ><description language="en"> > ><text>http://www.Warranty.com</text> > ></description> > ></hardlines:warrantyDescription> > ></hardlines:warrantyIndicator> > ><hardlines:nestingInformation> > ><hardlines:nestingFactor> > ><measurementValue unitOfMeasure="IN">50</measurementValue> > ></hardlines:nestingFactor> > ><hardlines:nestingQuantity>15</hardlines:nestingQuantity> > ></hardlines:nestingInformation> > ><hardlines:securityTagInformation> > ><hardlines:securityTagLocation>C</hardlines:securityTagLocation> > ></hardlines:securityTagInformation> > ><hardlines:palletData> > ><hardlines:palletHandlingCode>REUSABLE</hardlines:palletHandlingCode> > ></hardlines:palletData> > ><hardlines:outOfBoxInformation> > ><hardlines:volume> > ><measurementValue unitOfMeasure="CC">0.5</measurementValue> > ></hardlines:volume> > ><hardlines:netWeight> > ><measurementValue unitOfMeasure="KG">35</measurementValue> > ></hardlines:netWeight> > ><hardlines:netContent> > ><measurementValue unitOfMeasure="EA">10.4</measurementValue> > ></hardlines:netContent> > ><hardlines:grossWeight> > ><measurementValue unitOfMeasure="KG">35</measurementValue> > ></hardlines:grossWeight> > ><hardlines:packagingWeight> > ><measurementValue unitOfMeasure="GR">30</measurementValue> > ></hardlines:packagingWeight> > ><hardlines:depth> > ><measurementValue unitOfMeasure="IN">14</measurementValue> > ></hardlines:depth> > ><hardlines:diameter> > ><measurementValue unitOfMeasure="IN">50</measurementValue> > ></hardlines:diameter> > ><hardlines:height> > ><measurementValue unitOfMeasure="IN">50</measurementValue> > ></hardlines:height> > ><hardlines:pegHorizontal> > ><measurementValue unitOfMeasure="IN">15.5</measurementValue> > ></hardlines:pegHorizontal> > ><hardlines:pegVertical> > ><measurementValue unitOfMeasure="IN">60</measurementValue> > ></hardlines:pegVertical> > ><hardlines:width> > ><measurementValue unitOfMeasure="IN">66.35</measurementValue> > ></hardlines:width> > ><hardlines:isOutOfBoxProvided>true</hardlines:isOutOfBoxProvided> > ></hardlines:outOfBoxInformation> > ><hardlines:northAmericanWorkplaceHazardousInformation>5t6Y</hardlines:north A >mericanWorkplaceHazardousInformation> > ><hardlines:departmentOfTransportationDangerousGoodsNumber>12345678901234567 8 >90</hardlines:departmentOfTransportationDangerousGoodsNumber> > ><hardlines:isVariableMeasureTradeItem>true</hardlines:isVariableMeasureTrad e >Item> > ><hardlines:isTradeItemRecalled>true</hardlines:isTradeItemRecalled> > ><hardlines:urlForCareInformation>http://www.urlforcare.com</hardlines:urlFo r >CareInformation> > </tradeItem> > <dataRecipient>0000918910156</dataRecipient> > ><sourceDataPool>0000914001049</sourceDataPool> > > </catalogueItem> > ><catalogueItemNotificationIdentification> > ><uniqueCreatorIdentification>CLS-catalogueItemNotification-1</uniqueCreator I >dentification> > ><contentOwner> > ><gln>1111111111116</gln> > ></contentOwner> > ></catalogueItemNotificationIdentification> > ><uccnet:notificationTopic topic="NEW_ITEM"/> > > ></eanucc:catalogueItemNotification> > > </notifyCommandOperand> > </uccnet:notifyCommand> > </command> > </transaction> > </body> ></uccnet:envelope> > > >--------------------------------------------------- >Parser Invocation >--------------------------------------------------- > > DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); > dbf.setNamespaceAware(true); > dbf.setValidating(true); > >dbf.setAttribute("http://apache.org/xml/properties/schema/external-schemaLo c >ation", "http://www.uccnet.org/schemas/2.2/uccnet >file:///c:/schema/uccnet/2.2/Envelope.xsd"); > DocumentBuilder builder = dbf.newDocumentBuilder(); > Document doc = builder.parse(file); > >--------------------------------------------------- >Xerces 1.4.4 Output >--------------------------------------------------- >Warning: validation was turned on but an org.xml.sax.ErrorHandler was not >set, which is probably not what is desired. Parser will use a default >ErrorHandler to print the first 10 errors. Please call >the 'setErrorHandler' method to fix this. >Error: URI=file:c:/uccnet22_cin_20030910.xml Line=41: General Schema Error: >Type : >http://www.uccnet.org/schemas/2.2/uccnet,CatalogueItemNotificationType does >not derive from the type >http://www.uccnet.org/schemas/2.2/uccnet,PartyLinksType. >java.lang.NullPointerException > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1111) > at >org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:1 9 >5) > at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:197) > at test.Tester.testParse(Tester.java:63) > at test.Tester.main(Tester.java:81) > > >The given error message about PartyLinksType does not make any sense. If >you >read the schema, PartyLinksType has nothing to do with >CatalogueItemNotificationType. And what is the deal with the >NullPointerException?! > >--------------------------------------------------- >Xerces 2.5.0 >--------------------------------------------------- > >Warning: validation was turned on but an org.xml.sax.ErrorHandler was not >set, which is probably not what is desired. Parser will use a default >ErrorHandler to print the first 10 errors. Please call >the 'setErrorHandler' method to fix this. >Error: URI=file:///c:/uccnet22_cin_20030910.xml Line=2: Document is >invalid: >no grammar found. >Error: URI=file:///c:/uccnet22_cin_20030910.xml Line=2: Document root >element "uccnet:envelope", must match DOCTYPE root "null". > >I recieve the following output below from the parser. It appears to be >attempting DTD validation, rather than schema, but I could be mistaken. I >don't see any features that would control this type of behavior... > > >--- > >Corey Sanders >Senior Software Developer >Sterling Commerce, an SBC Company > >email: [EMAIL PROTECTED] >phone: (614) 659-6860 > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Compare Cable, DSL or Satellite plans: As low as $29.95. https://broadband.msn.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
