I have the following xml string and am trying to convert to sql.
- <report>
- <processlist>
- <process>
<imagename>smss.exe</imagename>
<pid>160</pid>
<path>\SystemRoot\System32\</path>
<ports />
- <dlllist>
<dll>dll1.exe</dll>
<dll>ntdll.dll</dll>
<dll>dll3.dll</dll>
</dlllist>
</process>
</processlist>
</report>
so I write the following in my sproc to transform this data to a tbldll table which has one column named "dll". Only problem is the table receives "dll1.exe" and null values for the other two dlls. This is the openxml statment from the sproc.
Insert into tblDLL
Select *
from OpenXML (@hDoc, '/report/processlist/process/dlllist/dll', 2)
with tblDLL
Any thoughts on how to transform all 3 of the "dll" tags to the tblDLL? I suspect it relates to my xpath query but I have tried many variations of this ie (..../dlllist/', 2) but same thing pretty much. Please help.
Rick
- <report>
- <processlist>
- <process>
<imagename>smss.exe</imagename>
<pid>160</pid>
<path>\SystemRoot\System32\</path>
<ports />
- <dlllist>
<dll>dll1.exe</dll>
<dll>ntdll.dll</dll>
<dll>dll3.dll</dll>
</dlllist>
</process>
</processlist>
</report>
so I write the following in my sproc to transform this data to a tbldll table which has one column named "dll". Only problem is the table receives "dll1.exe" and null values for the other two dlls. This is the openxml statment from the sproc.
Insert into tblDLL
Select *
from OpenXML (@hDoc, '/report/processlist/process/dlllist/dll', 2)
with tblDLL
Any thoughts on how to transform all 3 of the "dll" tags to the tblDLL? I suspect it relates to my xpath query but I have tried many variations of this ie (..../dlllist/', 2) but same thing pretty much. Please help.
Rick