Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6102551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:37:37+00:00 2026-05-23T13:37:37+00:00

I have an XML file and I would like to merge two different CONTACT

  • 0

I have an XML file and I would like to merge two different CONTACT child nodes.

I have checked these websites it shows how to merge two different xml files into a single file.

http://www2.informatik.hu-berlin.de/~obecker/XSLT/#merge

Merge XML documents

In my case this is my first contact in the xml file:

<CONTACT>
<PDE-Identity>N65539</PDE-Identity>
<FirstName>Arun_niit</FirstName>
<LastName>Arun_niit</LastName>
<Facebook-ID/>
<EMAILS>
<EMail>
<Type>yahoo</Type>
<Value>nura_ice@yahoo.co.in</Value>
</EMail>
</EMAILS>
</CONTACT>

This is the second contact in the file:

<CONTACT>
<PDE-Identity>N65567</PDE-Identity>
<FirstName>Arun_niit</FirstName>
<LastName>Ramanathan</LastName>
<Facebook-ID/>
<EMAILS>
<EMail>
<Type>gmail</Type>
<Value>arun_niit@gmail.com</Value>
</EMail>
<EMail>
<Type>yahoo</Type>
<Value>nura_ice@yahoo.co.in</Value>
</EMail>
</EMAILS>
</CONTACT>

I know both of the contacts are belongs to the same person. How can i merge these two contacts in the same xml file.

Original XML File:

<?xml version="1.0" encoding="UTF-8"?>
<CONTACTS>

<CONTACT>
<PDE-Identity>N65539</PDE-Identity>
<FirstName>Arun_niit</FirstName>
<LastName>Arun_niit</LastName>
<Facebook-ID/>
<EMAILS>
<EMail>
<Type>yahoo</Type>
<Value>nura_ice@yahoo.co.in</Value>
</EMail>
</EMAILS>
</CONTACT>

<CONTACT>   
<PDE-Identity>N65567</PDE-Identity>
<FirstName>Arun_niit</FirstName>
<LastName>Ramanathan</LastName>
<Facebook-ID/>
<EMAILS>
<EMail>
<Type>gmail</Type>
<Value>arun_niit@gmail.com</Value>
</EMail>
<EMail>
<Type>yahoo</Type>
<Value>nura_ice@yahoo.co.in</Value>
</EMail>
</EMAILS>
</CONTACT>


<CONTACT>
<PDE-Identity>N65567</PDE-Identity>
<FirstName>Rangarajkarthik</FirstName>
<LastName>karthik Rangaraj</LastName>
<Facebook-ID/>
<EMAILS>
<EMail>
<Type>gmail</Type>
<Value>kart2006@gmail.com</Value>
</EMail>
<EMail>
<Type>yahoo</Type>
<Value>karthikrangaraj@yahoo.com</Value>
</EMail>
</EMAILS>
</CONTACT>

<CONTACTS>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:37:38+00:00Added an answer on May 23, 2026 at 1:37 pm

    Most browsers support XML parsing in javascript already. Here’s a sample snippet, which you’ll have to adapt to parse your specific input.

    if (window.DOMParser)
      {
      parser=new DOMParser();
      xmlDoc=parser.parseFromString(text,"text/xml");
      }
    else // Internet Explorer
      {
      xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
      xmlDoc.async="false";
      xmlDoc.loadXML(text);
      } 
    

    For more information, I suggest you do a Google search for javascript xml dom.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML file that I would like to map some attributes of
I have an existing XML file that I would like to append without changing
I would like to update an xml file from another xml file.I have used
Hey I have an XML file and I would like to navigate to a
I have an xml file that I would like to generate a c# class
I have an XML file and would like to run a search on the
Hey. I have an XML file and would like to use PHP to display
Me again... I have an XML File that contains different categories which I would
Need help to perform merge two similar contact values. I would like to know
I have xml file, and I would like to find node with oldest date.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.