This repository was archived by the owner on Mar 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 227
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
spark-xml fails to load xml files with comments #83
Copy link
Copy link
Closed
Labels
Description
I found that spark-xml fails to load documents with comments in them. Has anyone else encountered this or I am doing something wrong. Here is a sample document I am having trouble with.
<?xml version="1.0" encoding="utf-8"?>
<!--
== Copyright (c) 2002-2015 All rights reserved.
== Financial Products Markup Language is subject to the FpML public license.
== A copy of this license is available at http://www.fpml.org/license/license.html
-->
<dataDocument xmlns="http://www.fpml.org/FpML-5/master" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" fpmlVersion="5-8" xsi:schemaLocation="http://www.fpml.org/FpML-5/master ../../../schema/fpml-main.xsd http://www.w3.org/2000/09/xmldsig# ../../../schema/xmldsig-core-schema.xsd">
<trade>
<tradeHeader>
<partyTradeIdentifier>
<partyReference href="Party1"/>
<tradeId tradeIdScheme="http://www.partyA.com/swaps/trade-id">Party19235</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="Party2"/>
<tradeId tradeIdScheme="http://www.barclays.com/swaps/trade-id">Party22000</tradeId>
</partyTradeIdentifier>
<tradeDate>2014-11-19</tradeDate>
</tradeHeader>
<repo>
<productType productTypeScheme="http://www.example.org/coding-scheme/product-taxonomy">InterestRate:Repo:BondRepo</productType>
<productId productIdScheme="http://www.example.org/coding-scheme/product-id">Repo</productId>
<fixedRateSchedule>
<initialValue>0.85</initialValue>
</fixedRateSchedule>
<dayCountFraction>ACT/ACT.ICMA</dayCountFraction>
<callingParty>AsDefinedInMasterAgreement</callingParty>
<initialMargin>
<marginType>Cash</marginType>
<marginRatio>1.25</marginRatio>
</initialMargin>
<nearLeg>
<buyerPartyReference href="Party1"/>
<sellerPartyReference href="Party2"/>
<settlementDate>
<adjustableDate>
<unadjustedDate>2014-11-03</unadjustedDate>
<dateAdjustments>
<businessDayConvention>NONE</businessDayConvention>
</dateAdjustments>
</adjustableDate>
</settlementDate>
<deliveryMethod>DeliveryVersusPayment</deliveryMethod>
<settlementAmount>
<currency>USD</currency>
<amount>782855.55</amount>
</settlementAmount>
<collateral>
<nominalAmount>
<currency>USD</currency>
<amount>1000000</amount>
</nominalAmount>
<cleanPrice>97.8569437</cleanPrice>
<accruals>9.250000</accruals>
<dirtyPrice>107.1069437</dirtyPrice>
<assetReference href="XSJKL"/>
</collateral>
</nearLeg>
<bond id="XSJKL">
<instrumentId instrumentIdScheme="isin">JKL Corp Bond</instrumentId>
</bond>
</repo>
</trade>
<party id="Party1">
<partyId>Party 1</partyId>
</party>
<party id="Party2">
<partyId>Party 2</partyId>
</party>
</dataDocument>