Load specific element from XML
You should use the nodes() method of the XML data type to shred your XML.

If I understand you correctly you want to fetch the nodes from the root node where the attribute type is line and from that node you want the nodes where the attribute type is 'item'. I will just assume that the XML you have provided with numeric node names is not the actual XML you are using but that the node names are valid XML names.

declare @XML xml = '
&lt;root&gt;
  &lt;A123 type="line"&gt;
    &lt;aa type="item"&gt;
      &lt;value&gt;1&lt;/value&gt;
    &lt;/aa&gt;
  &lt;/A123&gt;
  &lt;B234 type="line"&gt;
    &lt;bb type="item"&gt;
      &lt;value&gt;2&lt;/value&gt;
    &lt;/bb&gt;
  &lt;/B234&gt;
&lt;/root&gt;';

select T.X.value('text()[1]', 'int') as Value
from @XML.nodes('/root/*[@type = "line"]/*[@type = "item"]/value') as T(X)


A breakdown of the xPath in the nodes function:

From /root give me all nodes /root/* where the attribute type is line /root/*[@type = "line"] and from there give me all nodes /root/*[@type = "line"]* where the attribute type is item /root/*[@type = "line"]/*[@type = "item"]. 

Finally get the value node /root/*[@type = "line"]/*[@type = "item"]/value and extract the text node using the value() function.