Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
XmlDocument tempDoc = new XmlDocument();
int i = 0;
foreach(XmlNode node in xmlDoc.SelectNodes("//Catalog"))
{
i++;
tempDoc.RemoveAll();
tempDoc.AppendChild(node);
tempDoc.Save("file" + i);
}
Imports System
Imports System.IO
Imports System.Xml.Schema
Imports Microsoft.Data.SqlXml 'The SQLXML managed classes
Module Module2
Sub Main()
'Instantiate the SqlXmlCommand object and the connection
Dim objSqlXmlCmd As New SqlXmlCommand("Provider=SQLOLEDB;" _
& "Server=MYSERVER;Database=MyDB;" _
& "Integrated Security=SSPI")
'Set type of query
objSqlXmlCmd.CommandType = SqlXmlCommandType.Sql
objSqlXmlCmd.CommandText = "exec TitleTrackWork"
objSqlXmlCmd.RootTag = "Catalog"
objSqlXmlCmd.XslPath = "Format.xsl"
'execute into stream readed
Dim objStrmReader As New StreamReader(objSqlXmlCmd.ExecuteStream())
'prepare destiantion file
Dim objResult As New FileStream("Result.xml", FileMode.Create)
Dim objStrmWriter As New StreamWriter(objResult)
'write result into destination file
objStrmWriter.WriteLine(objStrmReader.ReadToEnd())
objStrmWriter.Close()
objResult.Close()
objStrmReader.Close()
End Sub
End Module
.......
objStrmReader.Close()
Dim xmlDoc As New XmlDocument
Dim tempDoc As New XmlDocument
Dim i As Int32 = 0
xmlDoc.Load("Result.xml")
For Each node As XmlNode In xmlDoc.SelectNodes("//Catalog")
i = i + 1
tempDoc.RemoveAll()
tempDoc.AppendChild(tempDoc.ImportNode(node, True))
tempDoc.Save("file" + i + ".xml")
Next
End Sub
End Module