rlbratt Newbie
Joined: 25 Jul 2005 Posts: 4
|
Posted: Jul 31st, 2006 03:29 PM Post subject: XML document imported into SQL 2000 db |
|
|
I have researched online for examples and found some for simple XML to SQL imports. Those are set for the data in each node's element. Also found examples how to pull the references for each node. Problem is, I"m trying to do both. Reference this XML below and then read the description.
<IMPORT_FILE>
<ASSET>
<ASSET_ID TYPE="HOST NAME"></ASSET_ID>
<ASSET_ID TYPE="IP ADDRESS">255.255.255.255</ASSET_ID>
<ASSET_ID TYPE="MAC ADDRESS"></ASSET_ID>
<ELEMENT/>
<TARGET>
<TARGET_KEY></TARGET_KEY>
<FINDING>
<FINDING_ID TYPE="AAA">100</FINDING_ID>
<FINDING_ID TYPE="BBB">200</FINDING_ID>
<FINDING_ID TYPE="CCC">300</FINDING_ID>
<FINDING_ID TYPE="DDD">400</FINDING_ID>
<FINDING_ID TYPE="EEE">500</FINDING_ID>
<FINDING_STATUS>1</FINDING_STATUS>
<FINDING_DETAILS OVERRIDE="O">ABCDEF</FINDING_DETAILS>
</FINDING>
<TOOL>HAMMER</TOOL>
<TOOL_VERSION>1.2.3.4</TOOL_VERSION>
</TARGET>
</ASSET>
<ASSET>
..
</ASSET>
..
..
</IMPORT_FILE>
Trying to use this document to build a table where the fields are defined by the various attribuite types and finding types.
i.e. fields are "host name', "ip address", "mac address", "AAA", "BBB", etc.
i.e. values put into these fields are NULL, 255.255.255.255, NULL, 100, etc.
If I ended up with "extra" fields, such as "finding status" that is OK, they could be ignored.
Any help would be GREAT!
Thanks!
Ryan |
|