XmlGenerator class
Core service for generating Odoo-compatible XML from OdooView models.
Produces clean, pretty-printed XML that is 100% compatible with Odoo 14.0+ view definitions.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
escape(
String text) → String - Escape special XML characters in a text value
-
generateArch(
OdooView view) → String - Generate only the
-
generateFile(
List< OdooView> views, {String? moduleName}) → String - Generate a complete views.xml file containing one or more views.
-
generateSingle(
OdooView view) → String - Generate XML for a single view (wrapped in
-
isValidXml(
String content) → bool - Validate that a string is well-formed XML
-
prettyPrint(
String raw) → String - Pretty-format raw XML string (basic indentation)
-
validateXml(
String xmlStr) → bool -
Returns
trueifxmlStris well-formed XML,falseotherwise.