Skip to content

Instantly share code, notes, and snippets.

View jamiewest's full-sized avatar
:octocat:
Coding

Jamie West jamiewest

:octocat:
Coding
View GitHub Profile
'==================== Class: CXmlWriter ====================
' Minimal XML writer for VBA7 (no DOM). Generates well-formed XML via a buffer.
' Features:
' - Pretty print (indent), configurable indent size and newline.
' - Tag stack using Strings (no UDT → safe with Collection/Variant boxing).
' - Attribute/write-order guards.
' - Convenience: WriteElementString, WriteComment.
' - One-liners with attributes: WriteElementStringWithAttributes,
' WriteEmptyElementWithAttributes, and Dictionary-based variants.
' - Ribbon helpers: WriteButton, WriteToggleButton.
'---------------------------------------------------------
' One-liners with attributes
' - Uses ParamArray (no extra references needed)
' - Also supports passing a Scripting.Dictionary (late-bound)
'---------------------------------------------------------
' <localName a1="v1" a2="v2">text</localName>
Public Sub WriteElementStringWithAttributes( _
ByVal localName As String, _
ByVal text As String, _
'---------------------------------------------------------
' Convenience methods
'---------------------------------------------------------
Public Sub WriteElementString(ByVal localName As String, ByVal text As String)
' <localName>escaped text</localName>
WriteStartElement localName
WriteString text
WriteFullEndElement
End Sub
'==================== Class: CXmlWriter ====================
' Minimal XML writer for VBA7.
' API (subset): WriteStartDocument, WriteDocType, WriteStartElement,
' WriteAttributeString, WriteStartAttribute/WriteEndAttribute,
' WriteString, WriteEndElement, WriteFullEndElement, WriteRaw,
' WriteEndDocument, GetXml, Reset.
'
' Notes:
' - Escapes &, <, > in text and adds " and ' escaping in attributes.
' - Keeps a stack of element names to ensure matching end tags.
'---------------------------------------------------------
' One-liners with attributes
' - Uses ParamArray (no extra references needed)
' - Also supports passing a Scripting.Dictionary (late-bound)
'---------------------------------------------------------
' <localName a1="v1" a2="v2">text</localName>
Public Sub WriteElementStringWithAttributes( _
ByVal localName As String, _
ByVal text As String, _
import 'package:extensions/hosting.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'flutter_builder.dart';
const String _versionsKey = 'VersionTracking.Versions';
const String _buildsKey = 'VersionTracking.Builds';
extension VersionInfoServiceCollectionExtensions on FlutterBuilder {