Skip to Content
0
Former Member
Dec 07, 2011 at 12:43 PM

how to add mulitple namespace in xml

428 Views

Hi,

I have this output xml:

<?xml version="1.0" encoding="utf-8" ?> 
- <E24B:E24B_Update_MachineCards_001 xmlns:E24B="urn:E24B_UpdateMachineCards_001">
- <E24B:DataArea>
- <E24B:UpdateMachineCards>
- <E24B:Machine>
- <E24B:Component>
  <f:ComponentSerNo xmlns:f="urn:fields">000000000000000456</f:ComponentSerNo> 
  <f:ComponentType xmlns:f="urn:fields">108</f:ComponentType> 
  </E24B:Component>
- <E24B:Market>
  <f:FinalMarket xmlns:f="urn:fields">TR</f:FinalMarket> 
  </E24B:Market>
  <f:SalesModel xmlns:f="urn:fields" /> 
  <f:SerialNo xmlns:f="urn:fields">000000000000000456</f:SerialNo> 
- <s:CntrolArea xmlns:s="urn:segments">
- <s:Bsr>
  <s:Noun>Machine Card</s:Noun> 
  <s:Verb>UPDATE</s:Verb> 
  </s:Bsr>
- <s:DateTime>
  <s:Dt_Qualifier>Creation</s:Dt_Qualifier> 
  <s:Dt_Value>20111207</s:Dt_Value> 
  <s:TimeZone>7200</s:TimeZone> 
-------------------------------------------------------------------------------


But this content is wrong.

The expected content should be as follows:



<?xml version="1.0" encoding="UTF-8" ?> 
- <E24B:E24B_Update_MachineCards_001 xmlns:E24B="urn:E24B_UpdateMachineCards_001" xmlns:f="urn:fields" xmlns:s="urn:segments"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <s:CntrolArea>
- <s:Bsr>
    
  <s:Verb>Update</s:Verb> 
    
  <s:Noun>Machine Card</s:Noun> 
    
-------------------------------------------------------------

Also xml content need to have multiple namespace. Can you help me please?

Nurhan