Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > BOOK: Beginning XSLT and XPath : Transforming XML Documents and Data
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning XSLT and XPath : Transforming XML Documents and Data
This is the forum to discuss the Wrox book Beginning XSLT and XPath : Transforming XML Documents and Data by Ian Williams ISBN: 978-0-470-47725-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XSLT and XPath : Transforming XML Documents and Data section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 15th, 2014, 04:54 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Post Handling Multiple message in XML file

Hi All,

How to parse the multiple message in xml?

When we receive multiple messages in a XML file, xml parser fails translation & consider its an invalid xml.

Input file:

<?xml version="1.0" encoding="UTF-8"?>
<Pip3B12ShippingOrderRequest>
<fromRole>
<PartnerRoleDescription>
<GlobalPartnerRoleClassificationCode/>
<PartnerDescription>
<BusinessDescription>
<GlobalBusinessIdentifier>CUSTOMER</GlobalBusinessIdentifier>
</BusinessDescription>
<GlobalPartnerClassificationCode/>
</PartnerDescription>
</PartnerRoleDescription>
</fromRole>
<GlobalDocumentFunctionCode>Request</GlobalDocumentFunctionCode>
<ShippingOrder>
<OrderInformation>
<orderDateTime>
<DateTimeStamp>20141116T224014</DateTimeStamp>
</orderDateTime>
<orderNumber>
<ProprietaryDocumentIdentifier>0800596734</ProprietaryDocumentIdentifier>
</orderNumber>
</OrderInformation>
<RequestingOrderInformation>
<DocumentReference>
<GlobalDocumentReferenceTypeCode/>
<ProprietaryDocumentIdentifier/>
</DocumentReference>
<GlobalOrderAdminCode>EDI</GlobalOrderAdminCode>
<isOrderToBeMerged>
<AffirmationIndicator/>
</isOrderToBeMerged>
<orderReference>
<ProprietaryDocumentIdentifier/>
<CustomerReference2/>
<CustomerReference3/>
<CustomerReference4/>
</orderReference>
</RequestingOrderInformation>
<ShipmentInformation>
<freightReference>
<ProprietaryDocumentIdentifier/>
</freightReference>
<freightTotalPhysicalDimension>
<PhysicalDimension>
<WeightDimension unit-of-measure=""/>
</PhysicalDimension>
</freightTotalPhysicalDimension>
<Instructions>
<notes>
<FreeFormText/>
</notes>
<ShipmentInstructions1/>
<ShipmentInstructions2/>
<ProprietaryShippingInstructionsCode/>
</Instructions>
<isDutyPaidByShipper>
<AffirmationIndicator>Y</AffirmationIndicator>
</isDutyPaidByShipper>
<RoutingInformation>
<GlobalFreightPaymentTermsCode>UN</GlobalFreightPaymentTermsCode>
<GlobalShippingServiceLevelCode>NBDP5</GlobalShippingServiceLevelCode>
<SequenceNumber/>
<transportedBy>
<PartnerDescription>
<BusinessDescription>
<GlobalBusinessIdentifier/>
</BusinessDescription>
<GlobalPartnerClassificationCode/>
</PartnerDescription>
</transportedBy>
</RoutingInformation>
<shipFrom>
<PartnerDescription>
<BusinessDescription/>
<GlobalPartnerClassificationCode/>
<PhysicalLocation>
<PartnerLocationIdentification>
<ProprietaryDomainIdentifier/>
<ProprietaryLocationIdentifier>T1</ProprietaryLocationIdentifier>
</PartnerLocationIdentification>
<PhysicalAddress>
<GlobalCountryCode>JP</GlobalCountryCode>
</PhysicalAddress>
</PhysicalLocation>
</PartnerDescription>
</shipFrom>
<shipTo>
<PartnerDescription>
<BusinessDescription>
<businessName>
<FreeFormText>Osaka</FreeFormText>
</businessName>
<GlobalBusinessIdentifier>0000222213</GlobalBusinessIdentifier>
</BusinessDescription>
<ContactInformation>
<contactName>
<FreeFormText/>
</contactName>
<facsimileNumber>
<CommunicationsNumber/>
</facsimileNumber>
<telephoneNumber>
<CommunicationsNumber/>
</telephoneNumber>
</ContactInformation>
<GlobalPartnerClassificationCode/>
<PhysicalLocation>
<PhysicalAddress>
<addressLine1>
<FreeFormText>Osaka</FreeFormText>
</addressLine1>
<addressLine2>
<FreeFormText>GLP 7F, 2-4-43 Nanko Suminoe-ku</FreeFormText>
</addressLine2>
<addressLine3>
<FreeFormText/>
</addressLine3>
<addressLine4>
<FreeFormText/>
</addressLine4>
<addressLine5>
<FreeFormText/>
</addressLine5>
<cityName>
<FreeFormText>Osaka-City, Osaka</FreeFormText>
</cityName>
<GlobalCountryCode>JP</GlobalCountryCode>
<NationalPostalCode>559-0032</NationalPostalCode>
<regionName>
<FreeFormText/>
</regionName>
</PhysicalAddress>
</PhysicalLocation>
</PartnerDescription>
</shipTo>
</ShipmentInformation>
<ShipmentLineItem>
<GlobalProductUnitOfMeasureCode>EA</GlobalProductUnitOfMeasureCode>
<isContainsHazardousMaterial>
<AffirmationIndicator/>
</isContainsHazardousMaterial>
<LineNumber>000001</LineNumber>
<productDescription>
<TextualDescription>
<detail>
<FreeFormText>ASSY,BSM,FIELDREPLACEMENT,REFURB</FreeFormText>
</detail>
<summary>
<FreeFormText/>
</summary>
</TextualDescription>
</productDescription>
<ProductIdentification>
<GlobalProductIdentifier>0030-1485R</GlobalProductIdentifier>
</ProductIdentification>
<QuantityInformation>
<requestedQuantity>
<ProductQuantity>00001</ProductQuantity>
</requestedQuantity>
</QuantityInformation>
<RequestingOrderLineItemReference>
<DocumentReference>
<GlobalDocumentReferenceTypeCode/>
<ProprietaryDocumentIdentifier/>
<LineType>P</LineType>
<LineItemPriceList/>
<LineItemUnitPrice>0.00</LineItemUnitPrice>
</DocumentReference>
<subLineNumber>
<LineNumber/>
<LotReference>
<requestedLot>
<ProprietaryLotIdentifier/>
</requestedLot>
</LotReference>
<ManufacturerProfile>
<productSerialIdentifier>
<ProprietarySerialIdentifier/>
</productSerialIdentifier>
</ManufacturerProfile>
</subLineNumber>
</RequestingOrderLineItemReference>
<LineItemReference>
<LineReference1/>
<LineReference2/>
<LineReference3/>
</LineItemReference>
</ShipmentLineItem>
</ShippingOrder>
<thisDocumentGenerationDateTime>
<DateTimeStamp>20141116T224014</DateTimeStamp>
</thisDocumentGenerationDateTime>
<thisDocumentIdentifier>
<ProprietaryDocumentIdentifier/>
<MessageProperties>
<SystemID>PA2</SystemID>
<TransactionPurpose>A</TransactionPurpose>
<MessageType>SOR</MessageType>
<MessageVersion>1.0</MessageVersion>
</MessageProperties>
<MessageSummary>
<TotalOfLineItemValues>0.00</TotalOfLineItemValues>
<TotalOrderValue>0.00</TotalOrderValue>
<TotalLineItems>00001</TotalLineItems>
</MessageSummary>
</thisDocumentIdentifier>
<toRole>
<PartnerRoleDescription>
<GlobalPartnerRoleClassificationCode/>
<PartnerDescription>
<BusinessDescription>
<GlobalBusinessIdentifier/>
</BusinessDescription>
<GlobalPartnerClassificationCode/>
</PartnerDescription>
</PartnerRoleDescription>
</toRole>
</Pip3B12ShippingOrderRequest>
<Pip3B12ShippingOrderRequest>
<fromRole>
<PartnerRoleDescription>
<GlobalPartnerRoleClassificationCode/>
<PartnerDescription>
<BusinessDescription>
<GlobalBusinessIdentifier>CUSTOMER</GlobalBusinessIdentifier>
</BusinessDescription>
<GlobalPartnerClassificationCode/>
</PartnerDescription>
</PartnerRoleDescription>
</fromRole>
<GlobalDocumentFunctionCode>Request</GlobalDocumentFunctionCode>
<ShippingOrder>
<OrderInformation>
<orderDateTime>
<DateTimeStamp>20141116T224014</DateTimeStamp>
</orderDateTime>
<orderNumber>
<ProprietaryDocumentIdentifier>0800596734</ProprietaryDocumentIdentifier>
</orderNumber>
</OrderInformation>
<RequestingOrderInformation>
<DocumentReference>
<GlobalDocumentReferenceTypeCode/>
<ProprietaryDocumentIdentifier/>
</DocumentReference>
<GlobalOrderAdminCode>EDI</GlobalOrderAdminCode>
<isOrderToBeMerged>
<AffirmationIndicator/>
</isOrderToBeMerged>
<orderReference>
<ProprietaryDocumentIdentifier/>
<CustomerReference2/>
<CustomerReference3/>
<CustomerReference4/>
</orderReference>
</RequestingOrderInformation>
<ShipmentInformation>
<freightReference>
<ProprietaryDocumentIdentifier/>
</freightReference>
<freightTotalPhysicalDimension>
<PhysicalDimension>
<WeightDimension unit-of-measure=""/>
</PhysicalDimension>
</freightTotalPhysicalDimension>
<Instructions>
<notes>
<FreeFormText/>
</notes>
<ShipmentInstructions1/>
<ShipmentInstructions2/>
<ProprietaryShippingInstructionsCode/>
</Instructions>
<isDutyPaidByShipper>
<AffirmationIndicator>Y</AffirmationIndicator>
</isDutyPaidByShipper>
<RoutingInformation>
<GlobalFreightPaymentTermsCode>UN</GlobalFreightPaymentTermsCode>
<GlobalShippingServiceLevelCode>NBDP5</GlobalShippingServiceLevelCode>
<SequenceNumber/>
<transportedBy>
<PartnerDescription>
<BusinessDescription>
<GlobalBusinessIdentifier/>
</BusinessDescription>
<GlobalPartnerClassificationCode/>
</PartnerDescription>
</transportedBy>
</RoutingInformation>
<shipFrom>
<PartnerDescription>
<BusinessDescription/>
<GlobalPartnerClassificationCode/>
<PhysicalLocation>
<PartnerLocationIdentification>
<ProprietaryDomainIdentifier/>
<ProprietaryLocationIdentifier>T1</ProprietaryLocationIdentifier>
</PartnerLocationIdentification>
<PhysicalAddress>
<GlobalCountryCode>JP</GlobalCountryCode>
</PhysicalAddress>
</PhysicalLocation>
</PartnerDescription>
</shipFrom>
<shipTo>
<PartnerDescription>
<BusinessDescription>
<businessName>
<FreeFormText>Osaka</FreeFormText>
</businessName>
<GlobalBusinessIdentifier>0000222213</GlobalBusinessIdentifier>
</BusinessDescription>
<ContactInformation>
<contactName>
<FreeFormText/>
</contactName>
<facsimileNumber>
<CommunicationsNumber/>
</facsimileNumber>
<telephoneNumber>
<CommunicationsNumber/>
</telephoneNumber>
</ContactInformation>
<GlobalPartnerClassificationCode/>
<PhysicalLocation>
<PhysicalAddress>
<addressLine1>
<FreeFormText>Osaka</FreeFormText>
</addressLine1>
<addressLine2>
<FreeFormText>GLP 7F, 2-4-43 Nanko Suminoe-ku</FreeFormText>
</addressLine2>
<addressLine3>
<FreeFormText/>
</addressLine3>
<addressLine4>
<FreeFormText/>
</addressLine4>
<addressLine5>
<FreeFormText/>
</addressLine5>
<cityName>
<FreeFormText>Osaka-City, Osaka</FreeFormText>
</cityName>
<GlobalCountryCode>JP</GlobalCountryCode>
<NationalPostalCode>559-0032</NationalPostalCode>
<regionName>
<FreeFormText/>
</regionName>
</PhysicalAddress>
</PhysicalLocation>
</PartnerDescription>
</shipTo>
</ShipmentInformation>
<ShipmentLineItem>
<GlobalProductUnitOfMeasureCode>EA</GlobalProductUnitOfMeasureCode>
<isContainsHazardousMaterial>
<AffirmationIndicator/>
</isContainsHazardousMaterial>
<LineNumber>000001</LineNumber>
<productDescription>
<TextualDescription>
<detail>
<FreeFormText>ASSY,BSM,FIELDREPLACEMENT,REFURB</FreeFormText>
</detail>
<summary>
<FreeFormText/>
</summary>
</TextualDescription>
</productDescription>
<ProductIdentification>
<GlobalProductIdentifier>0030-1485R</GlobalProductIdentifier>
</ProductIdentification>
<QuantityInformation>
<requestedQuantity>
<ProductQuantity>00001</ProductQuantity>
</requestedQuantity>
</QuantityInformation>
<RequestingOrderLineItemReference>
<DocumentReference>
<GlobalDocumentReferenceTypeCode/>
<ProprietaryDocumentIdentifier/>
<LineType>P</LineType>
<LineItemPriceList/>
<LineItemUnitPrice>0.00</LineItemUnitPrice>
</DocumentReference>
<subLineNumber>
<LineNumber/>
<LotReference>
<requestedLot>
<ProprietaryLotIdentifier/>
</requestedLot>
</LotReference>
<ManufacturerProfile>
<productSerialIdentifier>
<ProprietarySerialIdentifier/>
</productSerialIdentifier>
</ManufacturerProfile>
</subLineNumber>
</RequestingOrderLineItemReference>
<LineItemReference>
<LineReference1/>
<LineReference2/>
<LineReference3/>
</LineItemReference>
</ShipmentLineItem>
</ShippingOrder>
<thisDocumentGenerationDateTime>
<DateTimeStamp>20141116T224014</DateTimeStamp>
</thisDocumentGenerationDateTime>
<thisDocumentIdentifier>
<ProprietaryDocumentIdentifier/>
<MessageProperties>
<SystemID>PA2</SystemID>
<TransactionPurpose>A</TransactionPurpose>
<MessageType>SOR</MessageType>
<MessageVersion>1.0</MessageVersion>
</MessageProperties>
<MessageSummary>
<TotalOfLineItemValues>0.00</TotalOfLineItemValues>
<TotalOrderValue>0.00</TotalOrderValue>
<TotalLineItems>00001</TotalLineItems>
</MessageSummary>
</thisDocumentIdentifier>
<toRole>
<PartnerRoleDescription>
<GlobalPartnerRoleClassificationCode/>
<PartnerDescription>
<BusinessDescription>
<GlobalBusinessIdentifier/>
</BusinessDescription>
<GlobalPartnerClassificationCode/>
</PartnerDescription>
</PartnerRoleDescription>
</toRole>
</Pip3B12ShippingOrderRequest>



Is there anyway we can parse the xml file & process it.

Please suggest.

Thanks,
Praveen.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging multiple xml files into a single xml file Pauletta XSLT 4 April 18th, 2012 10:13 AM
Combine multiple xml files to create one xml file jonnyuk3 XSLT 6 March 29th, 2012 11:51 AM
How can I handle multiple XML declarations in XML File gkrishna.tibco XSLT 2 November 17th, 2010 08:49 AM
handling multiple input xml feeds stolte XSLT 5 March 3rd, 2010 05:21 PM
Multiple input xml / get data from other xml file elayaraja.s XSLT 3 July 25th, 2008 06:59 AM



All times are GMT -4. The time now is 03:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.