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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schema for bulk loader

Status
Not open for further replies.

andrewbadera

Programmer
Jan 27, 2002
43
0
0
US
Can anyone help me generate a schema for the following XML?

<?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot; ?>
<story>
<storyfilename>
<![CDATA[0125BUO_gang22.xml]]>
</storyfilename>
<storyorder>0</storyorder>
<section>
<![CDATA[1]]>
</section>
<storytype>
<![CDATA[6]]>
</storytype>
<subsection>
<![CDATA[ent]]>
</subsection>
<byline>
<![CDATA[Patrick Flanigan]]>
</byline>
<dateeline>
<![CDATA[Tuesday, November 11, 2003]]>
</dateeline>
<edition>
<![CDATA[Tuesday, November 11, 2003]]>
</edition>
<headline>
<![CDATA[title;<p>title 2<p>]]>
</headline>
<subhead>
<![CDATA[]]>
</subhead>
<summary>
<![CDATA[summary]]>
</summary>
<source>
<![CDATA[Staff Writer]]>
</source>
<storytext>
<![CDATA[story]]>
<p>PFLANIGA@DemocratandChronicle.com<p>]]>
</storytext>
<sidebar>
<header><![CDATA[If you go<p>]]></header>
<text><![CDATA[ second story text]]>
</sidebar>
<photo filename=&quot;&quot;
height=&quot;&quot;
width=&quot;&quot;>
<photographer>
<![CDATA[]]>
</photographer>
<caption>
<![CDATA[]]>
</caption>
</photo>
</story>

So far I have:
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<Schema name=&quot;schEntImport&quot; xmlns=&quot;urn:schemas-microsoft-com:xml-data&quot; xmlns:dt=&quot;urn:schemas-microsoft-com:datatypes&quot;>
<ElementType name=&quot;byline&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;caption&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;cciID&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;dateeline&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;header&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;headline&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;section&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;sidebar&quot; model=&quot;closed&quot; content=&quot;eltOnly&quot; order=&quot;seq&quot;>
<element type=&quot;header&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;text&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
</ElementType>
<ElementType name=&quot;source&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;story&quot; model=&quot;closed&quot; content=&quot;eltOnly&quot; order=&quot;seq&quot;>
<AttributeType name=&quot;xmlns&quot; dt:type=&quot;string&quot;/>
<attribute type=&quot;xmlns&quot;/>
<element type=&quot;cciID&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;storyfilename&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;storyorder&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;section&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;storytype&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;subsection&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;byline&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;dateeline&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;edition&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;headline&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;subhead&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;summary&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;source&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;storytext&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;sidebar&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
<element type=&quot;photo&quot; minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot;/>
</ElementType>
<ElementType name=&quot;storyfilename&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;storytext&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;storytype&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;subhead&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;summary&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>
<ElementType name=&quot;text&quot; model=&quot;closed&quot; content=&quot;textOnly&quot; dt:type=&quot;string&quot;/>

<ElementType name=&quot;story&quot; sql:relation=&quot;tStory&quot;>
<element type=&quot;cciID&quot; sql:field=&quot;idCCI&quot; />
<element type=&quot;section&quot; sql:field=&quot;idSection&quot; />
<element type=&quot;storytype&quot; sql:field=&quot;idSubSec&quot; />
<element type=&quot;byline&quot; sql:field=&quot;strByline&quot; />
<element type=&quot;dateeline&quot; sql:field=&quot;dtArticleDate&quot; />
<element type=&quot;headline&quot; sql:field=&quot;strHeadline&quot; />
<element type=&quot;subhead&quot; sql:field=&quot;strSubhead&quot; />
<element type=&quot;summary&quot; sql:field=&quot;strSummaryGraf&quot; />
<element type=&quot;source&quot; sql:field=&quot;strSource&quot; />
<element type=&quot;storytext&quot; sql:field=&quot;strText&quot; />
</ElementType>

<ElementType name=&quot;sidebar&quot; sql:relation=&quot;tStory&quot;>
<element type=&quot;header&quot; sql:field=&quot;strSidebarHeader&quot; />
<element type=&quot;text&quot; sql:field=&quot;strSidebarText&quot; />
</ElementType>

</Schema>

but I'm not sure that's handling the nested items properly ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top