IPWorks X12 2020 JavaScript Edition

Questions / Feedback?

UseSchemaName Property

Whether the output XML uses element names based on name defined in the schema.


 isUseSchemaName(): boolean;

 setUseSchemaName(useSchemaName: boolean): void;

Default Value



This setting specifies whether the XML element name written to output is taken from the Id of the element defined in the schema. It is only applicable to ArcESB JSON schemas. For instance, given an X12 document with the segment:

N1*BY*Apple Inc.*92*544380~

When this setting is True the XML generated may look like:

<N1Loop1 type="Loop">
<N1 type="Segment">
<_98 desc="Entity Identifier Code_98">BY</_98>
<_93 desc="Name_93">Apple Inc.</_93>
<_66 desc="Identification Code Qualifier_66">92</_66>
<_67 desc="Identification Code_67">544380</_67>

Where the elements "_98", "_93", etc. are taken from the Id values of the EDI elements in the schema files.

Note: In order to produce valid XML, elements that would begin with a digit are prefixed with the "_" character.

In contrast if False (default) the XML generated may look like:

<N1Loop1 type="Loop">
<N1 type="Segment" desc="Name">
<N101 desc="Entity Identifier Code_98">BY</N101>
<N102 desc="Name_93">Apple Inc.</N102>
<N103 desc="Identification Code Qualifier_66">92</N103>
<N104 desc="Identification Code_67">544380</N104>
The default value is False. This setting is only applicable when using ArcESB JSON schemas.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks X12 2020 JavaScript Edition - Version 20.0 [Build 8262]