irodov
asked on
Java-XML
Hi All,
I have a below XML using 3 DTO objects..
<?xml version="1.0" encoding="UTF-8"?>
<OrderDetails title="OrderDetails">
<FirmBook>?</FirmBook>
<BlockAccMnc>T25380</Block AccMnc>
<QuantityOnAllocations>110 00</Quanti tyOnAlloca tions>
<Date>Mon Jul 17 14:45:11 EDT 2006</Date>
<TradeType>CA</TradeType>
<OrderId>*</OrderId>
<ClientID>65475</ClientID>
<ProductType>EQ</ProductTy pe>
<ExecutionPoint>*</Executi onPoint>
<Currency>JPY</Currency>
<BasePrincipalOnAllocation s>61000</B asePrincip alOnAlloca tions>
<ExecutionChannel>*</Execu tionChanne l>
<ExecutionCountry>JPN</Exe cutionCoun try>
<FiI>32216031</FiI>
<Price>5</Price>
<GeneralProfile>*</General Profile>
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>5000</Quantity>
<AllocationDetailsList>
<AllocationId value="53187448">
<SubAccMnc>T20202</SubAccM nc>
<BasePrincipalOnExecutions >33000</Ba sePrincipa lOnExecuti ons>
<QuantityOnExecutions>6000 </Quantity OnExecutio ns>
<AllocationId>53187448</Al locationId >
<Price>5</Price>
<GeneralProfile>*</General Profile>
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>5000</Quantity>
<ExecutionDetailsList>
<ExecutionId value="SBALTSE?5.0">
<AllocationBP>0</Allocatio nBP>
<AllocationID>*</Allocatio nID>
<AllocationQuantity>0</All ocationQua ntity>
<ExecutionId>SBALTSE?5.0</ ExecutionI d>
<Price>5</Price>
<GeneralProfile>*</General Profile>
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>3000</Quantity>
</ExecutionId>
<ExecutionId value="SBALOSE?6.0">
<AllocationBP>0</Allocatio nBP>
<AllocationID>*</Allocatio nID>
<AllocationQuantity>0</All ocationQua ntity>
<ExecutionId>SBALOSE?6.0</ ExecutionI d>
<Price>6</Price>
<GeneralProfile>*</General Profile>
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>3000</Quantity>
</ExecutionId>
</ExecutionDetailsList>
</AllocationId>
<AllocationId value="53187454">
<SubAccMnc>T20202</SubAccM nc>
<BasePrincipalOnExecutions >28000</Ba sePrincipa lOnExecuti ons>
<QuantityOnExecutions>5000 </Quantity OnExecutio ns>
<AllocationId>53187454</Al locationId >
<Price>6</Price>
<GeneralProfile>*</General Profile>
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>6000</Quantity>
<ExecutionDetailsList>
<ExecutionId value="SBALTSE?5.0">
<AllocationBP>0</Allocatio nBP>
<AllocationID>*</Allocatio nID>
<AllocationQuantity>0</All ocationQua ntity>
<ExecutionId>SBALTSE?5.0</ ExecutionI d>
<Price>5</Price>
<GeneralProfile>*</General Profile>
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>2000</Quantity>
</ExecutionId>
<ExecutionId value="SBALOSE?6.0">
<AllocationBP>0</Allocatio nBP>
<AllocationID>*</Allocatio nID>
<AllocationQuantity>0</All ocationQua ntity>
<ExecutionId>SBALOSE?6.0</ ExecutionI d>
<Price>6</Price>
<GeneralProfile>*</General Profile>
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>3000</Quantity>
</ExecutionId>
</ExecutionDetailsList>
</AllocationId>
</AllocationDetailsList>
</OrderDetails>
In Java, I have a OrderDetails Object with some attributes, AllocationDetails with some attributes and ExecutionDetails with some attributes...
OrderDetails has a list of allocationDetails and allocationDetails has list of executionDetails...
I want to use this XML -- (which comes as a log from client) .. and prepare a java file -- which can automatically populate all the objects and then call other methods...
any ideas on how can I automatically build my object hiearchy based on XML ...
I am okay to use any API's that might have come up doing this-- like hibernate or springs etc..
please help accomplishing this.
regards
I have a below XML using 3 DTO objects..
<?xml version="1.0" encoding="UTF-8"?>
<OrderDetails title="OrderDetails">
<FirmBook>?</FirmBook>
<BlockAccMnc>T25380</Block
<QuantityOnAllocations>110
<Date>Mon Jul 17 14:45:11 EDT 2006</Date>
<TradeType>CA</TradeType>
<OrderId>*</OrderId>
<ClientID>65475</ClientID>
<ProductType>EQ</ProductTy
<ExecutionPoint>*</Executi
<Currency>JPY</Currency>
<BasePrincipalOnAllocation
<ExecutionChannel>*</Execu
<ExecutionCountry>JPN</Exe
<FiI>32216031</FiI>
<Price>5</Price>
<GeneralProfile>*</General
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>5000</Quantity>
<AllocationDetailsList>
<AllocationId value="53187448">
<SubAccMnc>T20202</SubAccM
<BasePrincipalOnExecutions
<QuantityOnExecutions>6000
<AllocationId>53187448</Al
<Price>5</Price>
<GeneralProfile>*</General
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>5000</Quantity>
<ExecutionDetailsList>
<ExecutionId value="SBALTSE?5.0">
<AllocationBP>0</Allocatio
<AllocationID>*</Allocatio
<AllocationQuantity>0</All
<ExecutionId>SBALTSE?5.0</
<Price>5</Price>
<GeneralProfile>*</General
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>3000</Quantity>
</ExecutionId>
<ExecutionId value="SBALOSE?6.0">
<AllocationBP>0</Allocatio
<AllocationID>*</Allocatio
<AllocationQuantity>0</All
<ExecutionId>SBALOSE?6.0</
<Price>6</Price>
<GeneralProfile>*</General
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>3000</Quantity>
</ExecutionId>
</ExecutionDetailsList>
</AllocationId>
<AllocationId value="53187454">
<SubAccMnc>T20202</SubAccM
<BasePrincipalOnExecutions
<QuantityOnExecutions>5000
<AllocationId>53187454</Al
<Price>6</Price>
<GeneralProfile>*</General
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>6000</Quantity>
<ExecutionDetailsList>
<ExecutionId value="SBALTSE?5.0">
<AllocationBP>0</Allocatio
<AllocationID>*</Allocatio
<AllocationQuantity>0</All
<ExecutionId>SBALTSE?5.0</
<Price>5</Price>
<GeneralProfile>*</General
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>2000</Quantity>
</ExecutionId>
<ExecutionId value="SBALOSE?6.0">
<AllocationBP>0</Allocatio
<AllocationID>*</Allocatio
<AllocationQuantity>0</All
<ExecutionId>SBALOSE?6.0</
<Price>6</Price>
<GeneralProfile>*</General
<Overrides>*</Overrides>
<Response>*</Response>
<Quantity>3000</Quantity>
</ExecutionId>
</ExecutionDetailsList>
</AllocationId>
</AllocationDetailsList>
</OrderDetails>
In Java, I have a OrderDetails Object with some attributes, AllocationDetails with some attributes and ExecutionDetails with some attributes...
OrderDetails has a list of allocationDetails and allocationDetails has list of executionDetails...
I want to use this XML -- (which comes as a log from client) .. and prepare a java file -- which can automatically populate all the objects and then call other methods...
any ideas on how can I automatically build my object hiearchy based on XML ...
I am okay to use any API's that might have come up doing this-- like hibernate or springs etc..
please help accomplishing this.
regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.