Click here to Skip to main content
16,017,922 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have two xml file like...

One is "test.xml"

XML
<policy>
        <feesandtaxesbyproduct>
            <feeandtaxes>
                <feesandtaxesbystate>
                .....
                </feesandtaxesbystate>

                <feesandtaxesbystate>
                .....
                </feesandtaxesbystate>
                <feesandtaxesbystate>
                .....
                </feesandtaxesbystate>
                <feesandtaxesbystate>
                .....
                </feesandtaxesbystate>


            </feeandtaxes>
        </feesandtaxesbyproduct>
    </policy>
</data>


second XML is "test2.xml"

        <feesandtaxesbyproduct>
            <feeandtaxes>
                <feesandtaxesbystate>
                .....
                </feesandtaxesbystate>

                <feesandtaxesbystate>
                .....
                </feesandtaxesbystate>
                <feesandtaxesbystate>
                .....
                </feesandtaxesbystate>
                <feesandtaxesbystate>
                .....
                </feesandtaxesbystate>


            </feeandtaxes>
        </feesandtaxesbyproduct>


Now i have to take the feesandtaxes entire node from second xml and replace in first xml....

Please suggest.
Posted

Take a look at ImportNode method available with XmlDocument class.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900