Websydian v6.1 online documentationOnline documentation - Websydian v6.1

FAQ - How to not suppress Blank and zero in XML documents

Product TransacXML
Version 4.01
Category Processing
Question How can elements and attributes with  Blank or Zero values be written to the document.
Answer The default behavior of TransacXML is to suppress the creation of empty elements and attributes.

To change this behavior for the element fields do the following:

In the InsertRowDangling functions insert the following code in the Post Point "Before check create element":
 

Set Local<CreateElement> = <CreateElement.Yes>


To change this behavior for the attributes do the following:

In the InsertRowDangling functions insert the following code in the Pre Point "Before check create attribute":
 

Set Local<CreateElement> = <CreateElement.Yes>


The changes will mean that all of the attributes and elementfields will be inserted into the document even though they are empty.

If you only want this behavior for specific fields, you must create a case structure in which you set Local<CreateElement> to yes for the specific fields. You can find information about the field being handled in the CurrentField variable.