XML Schema - new line in imported schema
I am creating an xml schema with the code this site .
Sub Create_XSD2()
Dim StrMyXml As String, MyMap As XmlMap
Dim StrMySchema As String
' Book.xml is the file created in section one of this topic.
StrMyXml = "C:\BookData.xml"
' Turn off async loading.
Application.DisplayAlerts = False
' Add the string to the XmlMaps collection.
Set MyMap = ThisWorkbook.XmlMaps.Add(StrMyXml)
Application.DisplayAlerts = True
' Create an empty file and output the schema.
StrMySchema = ThisWorkbook.XmlMaps(1).Schemas(1).XML
Open "C:\BookData2.xsd" For Output As #1
Print #1, StrMySchema
Close #1
End Sub
After importing data from an XML file, everything is placed on one line. How can I change this? Thanks, Lorenz
+3
source to share