Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenXML ?

Status
Not open for further replies.

therick

Programmer
Mar 20, 2001
34
US
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 &quot;dll&quot;. Only problem is the table receives &quot;dll1.exe&quot; 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 &quot;dll&quot; 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top