How to Add Additional parent in existing XML document
Are you looking for a way to Add Additional parent in existing XML document ? then read this thread to know how to do it
Hi All,
Here I have document like below.Here the xml document having a tag <carrier:Header> which is having two child.Now i want to add one more child to <carrier:Header> but at the same time it will be sub parent for existing child elements.For example,it should like below.how to make it.please help me.
<carrier:Header>
<carrier:Headercompany1>
<infra:MessageId>enroll</infra:MessageId>
<infra:Timestamp>2015-02-23</infra:Timestamp>
<carrier:Headercompany1>
</carrier:Header>
<EnrollmentRequest xsi:schemaLocation="http://iws.fuwt.org/enrollment/service" xmlns="http://iws.fuwt.org/enrollment/service" xmlns:core="http://iws.fuwt.org/enrollment/Core" xmlns:carrier="http://iws.fuwt.org/enrollment/Core/Carrier" xmlns:group="http://iws.fuwt.org/enrollment/Core/Group" xmlns:infra="http://iws.fuwt.org/enrollment/Core/Infra" xmlns:simple="http://iws.fuwt.org/enrollment/Core/SimpleTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<carrier:Header>
<infra:MessageId>enrollmentUpsert</infra:MessageId>
<infra:Timestamp>2015-02-23T12:00:58-05:00</infra:Timestamp>
</carrier:Header>
<carrier:Enrollment>
<carrier:TenantID>1</carrier:TenantID>
<carrier:GroupNumber>123</carrier:GroupNumber>
<carrier:FirstName>amal</carrier:FirstName>
<carrier:OfficePhone/>
<carrier:TribalID/>
<carrier:SubscriberAddresses>
<core:Address>
<core:AddressType>M</core:AddressType>
<core:EffectiveDate>2015-03-01</core:EffectiveDate>
<core:AddressLine1>29 Winthrop Road</core:AddressLine1>
<core:AddressLine2/>
<core:AddressLine3/>
<core:City>Short Hills</core:City>
<core:State>NJ</core:State>
<core:ZipCode>07078</core:ZipCode>
</core:Address>
</carrier:SubscriberAddresses>
<carrier:Groupc>44545431</carrier:Groupc>
</EnrollmentRequest>