Problem
By default the liquid XML libraries insert default values into missing optional attributes into the XML that they export.
This is not always the required functionality, and omitting these values still provides a valid XML document.
Resolution
These values can be omitted from the Output XML, by setting the NoOptionalAttributeDefaultOutput Propery of the SerializationContext.
Sample Code
C++ |
---|
LtXmlLib20::CSerializationContext ctx = LtXmlLib20::CSerializationContext::GetDefaultContext(); |
C# |
---|
LiquidTechnologies.Runtime.Net40.SerializationContext ctx = LiquidTechnologies.Runtime.Net40.SerializationContext.Default; |
Java |
---|
com.liquid_technologies.ltxmllib20.SerializationContext ctx = com.liquid_technologies.ltxmllib20.SerializationContext.Default; |
Visual Basic |
---|
Dim ctx As XmlSerializationContext |
Notes
Description | Value |
---|---|
Article Created | 15/6/2006 |
Relates to Versions | Liquid XML 2006 and greater |