SQL Server 2014 - UPSERT XML Multiple rows
Can suggest how to get the value of LineID while parsing the XML?

You can take this output in a variable to check for existence.
DECLARE @input XML = '&lt;Orders&gt;
        &lt;Order&gt;
            &lt;OrderID&gt;334&lt;/OrderID&gt;
            &lt;AmountPaid currencyID=&quot;EUR&quot;&gt;17.10&lt;/AmountPaid&gt;
            &lt;UserID&gt;marc58&lt;/UserID&gt;
            &lt;ShippingAddress&gt;
                &lt;Name&gt;Marc Juppé&lt;/Name&gt;
                &lt;Address&gt;Rue&lt;/Address&gt;
                &lt;City&gt;Paris&lt;/City&gt;
                &lt;StateOrProvince&gt;&lt;/StateOrProvince&gt;
                &lt;Country&gt;FR&lt;/Country&gt;
                &lt;Phone&gt;333333333&lt;/Phone&gt;
                &lt;PostalCode&gt;22222&lt;/PostalCode&gt;
             &lt;/ShippingAddress&gt;
             &lt;ShippingCosts&gt;4.50&lt;/ShippingCosts&gt;
             &lt;Lines&gt;
                &lt;Line&gt;
                   &lt;Details&gt;
                        &lt;ItemID&gt;3664&lt;/ItemID&gt;
                        &lt;Store&gt;47&lt;/Store&gt;
                        &lt;Title&gt;MCPU DDA010&lt;/Title&gt;
                        &lt;SKU&gt;mmx&lt;/SKU&gt;
                    &lt;/Details&gt;
                    &lt;LineID&gt;1111&lt;/LineID&gt;
                    &lt;Quantity&gt;1&lt;/Quantity&gt;
                    &lt;Price currencyID=&quot;EUR&quot;&gt;6.2&lt;/Price&gt;
                &lt;/Line&gt;
                &lt;Line&gt;
                   &lt;Details&gt;
                        &lt;ItemID&gt;3665&lt;/ItemID&gt;
                        &lt;Store&gt;45&lt;/Store&gt;
                        &lt;Title&gt;MCPU DFZ42&lt;/Title&gt;
                        &lt;SKU&gt;mmy&lt;/SKU&gt;
                    &lt;/Details&gt;
                    &lt;LineID&gt;1112&lt;/LineID&gt;
                    &lt;Quantity&gt;2&lt;/Quantity&gt;
                    &lt;Price currencyID=&quot;EUR&quot;&gt;3.2&lt;/Price&gt;
                &lt;/Line&gt;
            &lt;/Lines&gt;
        &lt;/Order&gt;
    &lt;/Orders&gt;
'


   SELECT
      LineId = XCol.value('(LineID)[1]','int')
      FROM 
      @input.nodes('/Orders/Order/Lines/Line') AS XTbl(XCol)

Here is the result set I get:

LineId
1111
1112