Dynamically Creating Tables based on XSD or XML
-
Hi All, I have to read in an xml or xsd document (XCCDF - The Extensible Configuration Checklist Description Format) and would like to create tables in the Database based on them (if they do not exist). I do NOT know what the Table names/Fields will be so I am looking to do it dynamically. XCCDF is a specification language for writing security checklists, benchmarks, and related kinds of documents. This is a view of the formt (xml):
<?xml version="1.0" encoding="utf-8"?>
<Benchmark id="MicrosoftSecurityComplianceManagementForWindows2008" resolved="0" xml:lang="en" xmlns="http://checklists.nist.gov/xccdf/1.1" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:cpe="http://cpe.mitre.org/XMLSchema/cpe/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.1 xccdf-1.1.xsd http://cpe.mitre.org/XMLSchema/cpe/1.0 cpe-1.0.xsd">
<status date="2008-05-16">draft</status>
<title>Microsoft Security Compliance Management for Windows Server 2008</title>
<description>Microsoft Security Compliance Management for Windows Server 2008</description>
<notice id="terms-of-use" xml:lang="en">
</notice>
<front-matter>
xhtml:p
</xhtml:p>
</front-matter>
<rear-matter>
</rear-matter>
<reference href="http://checklists.nist.gov/repository/1001.html">
dc:titleMicrosoft Security Compliance Management for Windows Server 2008</dc:title>
dc:creatorMicrosoft Solution Accelerator for Security and Compliance</dc:creator>
dc:publisher
</dc:publisher>
dc:identifier
</dc:identifier>
</reference>
...
...Full info on these files can be found here[^] So, any ideas how to do this dynamically?
Regards, Dan
-
Hi All, I have to read in an xml or xsd document (XCCDF - The Extensible Configuration Checklist Description Format) and would like to create tables in the Database based on them (if they do not exist). I do NOT know what the Table names/Fields will be so I am looking to do it dynamically. XCCDF is a specification language for writing security checklists, benchmarks, and related kinds of documents. This is a view of the formt (xml):
<?xml version="1.0" encoding="utf-8"?>
<Benchmark id="MicrosoftSecurityComplianceManagementForWindows2008" resolved="0" xml:lang="en" xmlns="http://checklists.nist.gov/xccdf/1.1" xmlns:cdf="http://checklists.nist.gov/xccdf/1.1" xmlns:cpe="http://cpe.mitre.org/XMLSchema/cpe/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.1 xccdf-1.1.xsd http://cpe.mitre.org/XMLSchema/cpe/1.0 cpe-1.0.xsd">
<status date="2008-05-16">draft</status>
<title>Microsoft Security Compliance Management for Windows Server 2008</title>
<description>Microsoft Security Compliance Management for Windows Server 2008</description>
<notice id="terms-of-use" xml:lang="en">
</notice>
<front-matter>
xhtml:p
</xhtml:p>
</front-matter>
<rear-matter>
</rear-matter>
<reference href="http://checklists.nist.gov/repository/1001.html">
dc:titleMicrosoft Security Compliance Management for Windows Server 2008</dc:title>
dc:creatorMicrosoft Solution Accelerator for Security and Compliance</dc:creator>
dc:publisher
</dc:publisher>
dc:identifier
</dc:identifier>
</reference>
...
...Full info on these files can be found here[^] So, any ideas how to do this dynamically?
Regards, Dan
Dan Madden wrote:
So, any ideas how to do this dynamically?
Could you be more specific. Your post seems to be asking for a complete solution rather than answers to specific questions. You have also not provided any development environment information.
led mike