> On 21. Mar 2024, at 16:11, Lee Badham via MBS Xojo Plugins > <[email protected]> wrote: > > Hi, > > Are there any examples of using XMLConfigurationMBS.formatprettyprint? Thanks for asking. Here is a sample: // parse it Dim doc As New XMLDocumentMBS("<test id=""123""><f>1</f><f>2</f><f>3</f><f>4</f></test>") // create serializer Dim serializer As New XMLSerializerMBS // options Dim config As XMLConfigurationMBS = serializer.DOMConfig serializer.NewLine = EndOfLine config.SpaceFirstLevelElements = False config.FormatPrettyPrint = True // and output to string Dim s1 As String = serializer.writeToString(doc) // options config.FormatPrettyPrint = False // and output to string Dim s2 As String = serializer.writeToString(doc) Break // compare in debugger It will do the nice formatted one and the compact one. If you set FormatPrettyPrint to true, you may set SpaceFirstLevelElements to false to avoid empty lines. Best regards, Christian -- Read our blog about news on our plugins: http://www.mbsplugins.de/ _______________________________________________ MBS Xojo Plugins mailing list -- [email protected] To unsubscribe send an email to [email protected]
[MBS] Re: XMLConfigurationMBS.formatprettyprint
Christian Schmitz via MBS Xojo Plugins Thu, 21 Mar 2024 10:27:33 -0700
- [MBS] [ANN] MonkeyBread Software Re... Christian Schmitz via MBS Xojo Plugins
- [MBS] XMLConfigurationMBS.form... Lee Badham via MBS Xojo Plugins
- [MBS] Re: XMLConfiguration... Christian Schmitz via MBS Xojo Plugins
- [MBS] Re: XMLConfigura... Lee Badham via MBS Xojo Plugins
- [MBS] Re: XMLConfi... Christian Schmitz via MBS Xojo Plugins
