2014-05-08 37 views
0

我正在使用駱駝XML拆分器拆分基本上是XML的ONIX文件。它還包含我需要隨每個拆分消息一起發送的標題。我怎樣才能做到這一點駱駝xml分配器?另外我怎樣才能讓駱駝xml令牌不區分大小寫?駝峯xml分離器頭支持

這是ONIX xml文件。

<ONIXMessage> 
<Header> 
<FromCompany>HarperCollins Publishers India</FromCompany> 
<FromPerson>Richard Collogan +61 2 9952 5522</FromPerson> 
<FromEmail>[email protected]</FromEmail> 
<ToCompany>HarperCollins Publishers India</ToCompany> 
<SentDate>201312241110</SentDate> 
</Header> 
<Product> 
<RecordReference>9788172238475</RecordReference> 
<NotificationType>03</NotificationType> 
<ProductIdentifier> 
<ProductIDType>02</ProductIDType> 
<IDValue>8172238479</IDValue> 
</ProductIdentifier> 
<ProductIdentifier> 
<ProductIDType>03</ProductIDType> 
<IDValue>9788172238475</IDValue> 
</ProductIdentifier> 
<ProductIdentifier> 
<ProductIDType>15</ProductIDType> 
<IDValue>9788172238475</IDValue> 
</ProductIdentifier> 
<ProductForm>BC</ProductForm> 
<ProductFormDetail>B105</ProductFormDetail> 
<NoSeries/> 
<Title> 
<TitleType>01</TitleType> 
<TitleText>The White Tiger Pb</TitleText> 
</Title> 
<Website> 
<WebsiteLink> 
http://www.harpercollins.co.in/product.asp?isbn=9788172238475 
</WebsiteLink> 
</Website> 
<Contributor> 
<ContributorRole>A01</ContributorRole> 
<PersonNameInverted>Adiga, Aravind</PersonNameInverted> 
<KeyNames>Adiga Aravind</KeyNames> 
</Contributor> 
<NoEdition/> 
<BICMainSubject>FA</BICMainSubject> 
<BICVersion>2</BICVersion> 
<OtherText> 
<TextTypeCode>02</TextTypeCode> 
<Text textformat="02"> 
<![CDATA[ 
Winner of the Man Booker Prize 2008 Meet Balram Halwai, the &#39;white tiger&#39;: servant, philosopher, entrepreneur, murderer&#38;hellip; Born in a village in the dark heart of India, the son of a rickshaw puller, Balram is taken out of school and put to work in a teashop. As he crushes coal and wipes tables, he nurses a dream of escape. His big chance comes when a rich landlord hires him as a chauffeur for his son, daughter-in-law, and their two Pomeranian dogs. From behind the wheels of a Honda, Balram sees Delhi and begins to see how the Tiger might escape his cage. For surely any successful man must spill a little blood on his way to the top? The White Tiger is a tale of two Indias. Balram&#39;s journey from the darkness of village life to the light of entrepreneurial success is utterly amoral, brilliantly irreverent, deeply endearing and altogether unforgettable. 
]]> 
</Text> 
</OtherText> 
<OtherText> 
<TextTypeCode>13</TextTypeCode> 
<Text textformat="02"> 
<![CDATA[ 
Aravind Adiga was born in Madras in 1974. He studied at Columbia and Oxford universities. A former India correspondent for Time magazine, his articles have also appeared in publications including the Financial Times, Independent and the Sunday Times. His first novel, The White Tiger, won the Man Booker Prize in 2008 and was shortlisted for the John Llewellyn Rhys Prize, as was his short-story collection Between the Assassinations (2009). 
]]> 
</Text> 
</OtherText> 
<MediaFile> 
<MediaFileTypeCode>04</MediaFileTypeCode> 
<MediaFileLinkTypeCode>01</MediaFileLinkTypeCode> 
<MediaFileLink> 
http://www.harpercollins.co.in/image.asp?isbn=9788172238475 
</MediaFileLink> 
</MediaFile> 
<Imprint> 
<ImprintName>HarperCollins</ImprintName> 
</Imprint> 
<Publisher> 
<PublishingRole>01</PublishingRole> 
<PublisherName>Harpercollins Publishers</PublisherName> 
</Publisher> 
<PublishingStatus>04</PublishingStatus> 
<PublicationDate>20091103</PublicationDate> 
<SalesRights> 
<SalesRightsType>01</SalesRightsType> 
<RightsCountry>IN PK LK BT MV BD NP</RightsCountry> 
</SalesRights> 
<Measure> 
<MeasureTypeCode>08</MeasureTypeCode> 
<Measurement>309</Measurement> 
<MeasureUnitCode>gr</MeasureUnitCode> 
</Measure> 
<SupplyDetail> 
<SupplierName>HarperCollins Publishers India</SupplierName> 
<ProductAvailability>21</ProductAvailability> 
<Stock> 
<OnHand>500</OnHand> 
<OnOrder>0</OnOrder> 
</Stock> 
<Price> 
<PriceTypeCode>01</PriceTypeCode> 
<PriceAmount>350.00</PriceAmount> 
<CurrencyCode>INR</CurrencyCode> 
<CountryCode>IN</CountryCode> 
</Price> 
<Price> 
<PriceTypeCode>01</PriceTypeCode> 
<PriceAmount>5.62</PriceAmount> 
<CurrencyCode>USD</CurrencyCode> 
<CountryCode>PK LK BT MV BD NP</CountryCode> 
</Price> 
</SupplyDetail> 
<MarketRepresentation> 
<AgentName>HarperCollins Publishers India</AgentName> 
<AgentRole>07</AgentRole> 
<MarketCountry>IN PK LK BT MV BD NP</MarketCountry> 
<MarketPublishingStatus>04</MarketPublishingStatus> 
<MarketDate> 
<MarketDateRole>01</MarketDateRole> 
<Date>20091103</Date> 
</MarketDate> 
</MarketRepresentation> 
</Product> 
</ONIXMessage> 
+0

以什麼形式你想在XML中分割消息添加標題信息?作爲交換頭文件?或者是身體的一部分?我不知道是否可以使標記器工作不區分大小寫,但如果不能,我不會感到驚訝。 XML是一種區分大小寫(元)的語言。國際海事組織使用不是錯誤的標記器。 – Ralf

+0

目前還不清楚ONIX消息如何拆分。一些代碼你已經嘗試過會有所幫助。 –

回答