on 04-28-2010 9:35 AM
Hi Experts,
Actually i want to remove the parentnode tag from the resultant output, do we have any java code to remove such xml nodes.
mt_receiver
HeaderNode
--Field1
--Field2
ParentNode
PurchaseOrder
--Field1
--Field2
PurchaseHeader
--Field1
--Field2
Details
--Field1
--Field2
--Field3
ParentNode
PurchaseOrder
--Field1
--Field2
PurchaseHeader
--Field1
--Field2
Details
--Field1
--Field2
--Field3
regards,
sai
Did you give the receiver MT structure....Dont map the node to any source node/ element....and if thmin. e occurence is 0 then you wont have that node in the output file......is this the logic that you are looking for?
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Actually i have to process multiple purchase orders which is coming from IDOC and when i didn't use the parent node i am getting all the purchase orders and then purchase order header followed with details,
But i need the detials records and purchase order header corresponding to the purchase order, so for that i have define parent node, but at the output i dont require this parent node..
i mean the output shuld look like below by removing parent node.
mt_receiver
HeaderNode
--Field1
--Field2
PurchaseOrder
--Field1
--Field2
PurchaseHeader
--Field1
--Field2
Details
--Field1
--Field2
--Field3
PurchaseOrder
--Field1
--Field2
PurchaseHeader
--Field1
--Field2
Details
--Field1
--Field2
--Field3
i think you understand now..
regards,
sai
i think you understand now
ok....now got something
So you are saying that there is ParentNode which is having sub-elements as PurchaseOrder and Details....now you want to have the structure without ParentNode i.e. only PurchaseOrder and Details hsoule be present.
My question why you want to remove ParentNode? If you remove ParentNode then all the PurchaseOrder nodes will come one after the other and all the Details nodes will come as a separate group:
mt_receiver
HeaderNode
PurchaseOrder
PurchaseOrder
PurchaseHeader
PurchaseHeader
Details
Details
Do you want such a sequence to occur?
Regards,
Abhishek.
Hi,
Intially without defining the parentnode i have defined the structure and i got the output as defined by you i.e i got all the purchase order once and then purchase order header followed with details records, Here we dont know which detail record corresponds to purchase order,
So i have changed the structure and kept ParentNode as the root for the purchase order, purchare order header and for the detail
now in the output client requires without the parent node. the structure which i shown in the above discussion..
Hope you got my requirement,
regards,
Sai,
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.