I am brand new to OPENXML, and have 90 % of what I want to do working...stuck on this:
<ReportHost name="411.114.42.42">
<HostProperties>
<tag name="HOST_END">Wed Nov 11 20:48:43 2015</tag>
<tag name="LastAuthenticatedResults">8675309</tag>
<tag name="Credentialed_Scan">true</tag>
<tag name="policy-used">AWT v6</tag>
<tag name="ssh-auth-meth">MyPassword</tag>
<tag name="ssh-login-used">MyLogin</tag>
<tag name="local-checks-proto">ssh</tag>
<tag name="host-ip">411.114.42.42</tag>
<tag name="HOST_START">Wed Nov 11 20:00:01 2015</tag>
</HostProperties>
</ReportHost>
My Desired results:
Wed Nov 11 20:48:43 2015
8675309
TRUE
AWT v6
MyPassword
MyLogin
ssh
411.114.42.42
Wed Nov 11 20:00:01 2015
I am able to get the name value ("Host_end", etc.), but not the content.
My query:
Select *
from OPENXML (@hdoc,'/ReportHost/HostProperties/tag',1)
WITH (
name varchar (500)
)
I'd like to stick with OPENXML if at all possible, since I just spent the day learning it and getting to this final step.
Please let me know if I have provided enough info.