JKI-EasyXML icon indicating copy to clipboard operation
JKI-EasyXML copied to clipboard

Empty XML Element tag issue

Open pbrooks100 opened this issue 5 years ago • 1 comments

I'm using JKI-EasyXML to write test results for a third party. They claim that the empty elements contained in the file are not compliant; the element tag should have a space between the name and the forward slash. Their parser rejects the JKI-EasyXML output.

https://www.w3schools.com/xml/xml_elements.asp

There are two ways to indicate an empty element;

<element></element> or <element />

Example of JKI-EasyXML output:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<TESTRESULTS>
  <MODEL>UNKNOWN</MODEL>
  <PC>Station 1</PC>
  <SERIALNUMBER>BR549</SERIALNUMBER>
  <PN/>
  <MAC>00:11:22:33:44:55</MAC>
  <HWID/>
  <R/>
  <PASSFAIL>P</PASSFAIL>
  <FAILCODE/>
</TESTRESULTS>

Expected XML:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<TESTRESULTS>
  <MODEL>UNKNOWN</MODEL>
  <PC>Station 1</PC>
  <SERIALNUMBER>BR549</SERIALNUMBER>
  <PN />
  <MAC>00:11:22:33:44:55</MAC>
  <HWID />
  <R />
  <PASSFAIL>P</PASSFAIL>
  <FAILCODE />
</TESTRESULTS>

I've narrowed the issue down to

 'JKI_EasyXML.llb\XML Build Entity__JKI EasyXML.vi'

but due to the recursive design of the calling VI

 'JKI_EasyXML.llb\Variant to XML - core - __JKI EasyXML.vi' 

I am hesitant to make any quick changes.

pbrooks100 avatar Oct 25 '18 14:10 pbrooks100