How can i specify default XML namespace when it does not declared in
the xml document
I need it for validation against xml schema
@@@I have a procedure
Sub ValidateXMLDocument(ByRef XMLDocument As Xml.XmlDocument, ByVal
SchemaPath as string)
If XMLDocument.DocumentElement.NamespaceURI = String.Empty Then
'@@@ calculating target namspace of the schema
Dim schemaDoc as XmlDocument = new XMLDocument
schemaDoc.load(SchemaPath)
Dim targetNamespace as string =
schemaDoc.selectSingleNode("@targetNamespace").val ue
'@@@ Here i need help of experts!
'@@@ how can i provide targetNamespace in to the XMLDocument to
specify that
'@@@this document belongs to this namespace?
End If
'@@@ here goes standart opearion of the validation xmldocument against
xml schema
End Sub
P.S. Creating attribute with name "xmlns" does't work