是否有可能建立一個XSD,將治療任何標籤的內容,就像文字?我試圖提取標籤的有時包含HTML標籤的內容。沒有固定的HTML格式,並不總是存在。我只想從標籤中提取所有文本。 e.g. <content>this is a new piece of content by <b>Person A</b></content>.
我只想提取"this is a new piece of content by <b>Person A</b>"
,但由SSIS生成的模式自然包含這些標記。當我剛加入簡單的入門創建XSD忽略標籤
<xs:element minOccurs="0" name="content" type="xs:string"></xs:element>
我收到以下錯誤,並不出人意料。
[XML Source [5]] Error: The XML Source was unable to process the XML data. The element "content" cannot contain a child element. Content model is text only.
非常感謝。我按照你的建議嘗試了。 ''<?xml version =「1.0」?> ''This was an error on不支持SSIS選擇器元素 –
您需要了解如何在SSIS中使用XPath。請參見[使用XML任務運行XPath查詢](http://agilebi.com/jwelch/2008/07/23/使用-xml-task-to-run-an-xpath-query /) – kjhughes