Check out example codes for "nokogiri xml diff". It will help you in understanding the concepts better.

Code Example 1

<?xml version="1.0" encoding="UTF-8"?>
<SourceDetails>
        <Origin>FEED</Origin>
        <Identifier>IR</Identifier>
        <Timestamp>2017-01-01T02:11:01Z</Timestamp>
    </SourceDetails>
    <AsOfDate>2017-01-02</AsOfDate>
    <Instrument>
        <CommonCode>GB0</CommonCode>
    </Instrument>
    <Rate>0.69</Rate>

Learn ReactJs, React Native from akashmittal.com