1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Dim ContentTypeNamespace As String = "http://schemas.openxmlformats.org/package/2006/content-types"
Dim xmlDoc As New XmlDocument()
xmlDoc.PreserveWhitespace = True
xmlDoc.Load(contentTypes)
contentTypes.Close()
'Create an XmlNamespaceManager for resolving namespaces
Dim nsmgr As New XmlNamespaceManager(xmlDoc.NameTable)
nsmgr.AddNamespace("t", ContentTypeNamespace)
' For each doc, let's extract text
Dim node As XmlNodeList = xmlDoc.DocumentElement.SelectNodes("package/manifest/item[media-type='application/xhtml+xml']/href", nsmgr)
For Each activeNode As XmlNode In node
Extract_text(activeNode.Value)
Next
Dim node As XmlNodeList = xmlDoc.DocumentElement.SelectNodes("package/manifest/item[media-type='application/xhtml+xml']/href", nsmgr) |