I do not think you can accomplish what you need using the WITH command, since you have multiple detail level lines using both element and attribute centric values.
I played with it a bit but could not get it to work correctly when specifying the attribute paths for each field.
You may have return the results as an edge table and extract your information.
You could save it to a temp table and build your records off of that.
If I get some time later I will see if I can find or write something that would read the edge table.
There may be some utility out there using a CTE to recursively and smartly build a row from an edge table but I did not see any with a quick search.
DECLARE @Xml VARCHAR(4000)
SET @Xml = YourXMLChunk
-- Initialize XML handle
DECLARE @hdoc INT
EXEC sp_xml_preparedocument @hdoc OUTPUT, @Xml
SELECT Id, ParentId, NodeType, LocalName, [Text]
FROM OPENXML ( @hdoc, '/', 2 ) AS x
-- Release XML handle
EXEC sp_xml_removedocument @hdoc