Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Updated for Version 4.16

Overview

Larger organizations (e.g., the Department of Transportation) may submit the same form type (e.g., Construction Stormwater Permit, monthly reports, etc.) in a regular and repetitive manner. To help better support these situations and to minimize data entry requirements, a feature was established in the nFORM system which allows these organizations to upload data for a form via a form-compliant XML document.

...

The table below represents the expected structure of the payload within the document.

<?xml version=”1.0” encoding="utf-8"?>

<PAYLOAD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="[Local XML Schema File Location]">

<SUBMISSION>

<FormMetaData>

<FormName>[Form Name]</FormName>

<FormTag>[Form Tag]</FormTag>

<FormVersion>

<MajorVersion>[Form Major Version Number]</MajorVersion>

<MinorVersion>[Form Minor Version Number]</MinorVersion>

</FormVersion>

</FormMetaData>

[Form/Submission Sections and Controls]

</SUBMISSION>

</PAYLOAD>

The following properties will be dynamically assigned from form-to-form:

  • Schema properties:

    • Local XML Schema File Location: The local workstation path to the form’s XML Schema. This is used to allow the XML editing tool to validate the XML file against the schema.

  • Form properties: These form properties are included for reference and troubleshooting purposes.

    • Form Name: The name of the form which will be populated from this document.

    • Form Tag: The Tag name of the form which will be populated from this document.

    • Form Major Version Number: The major version # of the form which will be populated from this document. This is used to ensure the structure of the XML document is aligned with the current version of the form.

    • Form Minor Version Number: The minor version # of the form which will be populated from this document. This is used to ensure the structure of the XML document is aligned with the current version of the form.

  • Form/Submission Sections and Controls properties:

    • Form/Submission Sections and Controls: This is where the main submission/form content will reside. This portion of the XML document will vary from form-to-form, based on the configuration of the specific form.

For example:

<?xml version=”1.0” encoding="utf-8"?>

<PAYLOAD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Users\miscuser\Desktop\XMLImportDemo Schema.xsd">

<SUBMISSION>

<FormMetaData>

<FormName>XML Import Demo</FormName>

<FormTag>XMLImportDemo</FormTag>

<FormVersion>

<MajorVersion>1</MajorVersion>

<MinorVersion>0</MinorVersion>

</FormVersion>

</FormMetaData>

<SECTION1>

<CONTROL1>Control1Value</CONTROL1>

<CONTROL2>Control2Value</CONTROL2>

<CONTROL3>Control3Value</CONTROL3>

</SECTION1>

<SECTION2>

<CONTROL4>Control4Value</CONTROL4>

<CONTROL5>Control5Value</CONTROL5>

<CONTROL6>Control6Value</CONTROL6>

</SECTION2>

<SECTION3>

<CONTROL7>Control7Value</CONTROL7>

<CONTROL8>Control8Value</CONTROL8>

<CONTROL9>Control9Value</CONTROL9>

</SECTION3>

</SUBMISSION>

</PAYLOAD>

Form/Submission Sections and Controls

...

The following table provides an example of the structure expected within the form/submission sections and controls area:

<COMPANY>

<COMPANYNAME>Acme Corp.</COMPANYNAME>

<SITENUMBER>125-555-664</SITENUMBER>

<FACILITYTYPE>Incinerator</FACILITYTYPE>

</COMPANY>

<SITELOCATION>

<LOCATIONNAME>Acme Corp West Portland Plant</LOCATIONNAME>

<LOCATIONCOORDINATES>

<Lat>34.751158293554106</Lat>

<Long>-92.3188054182129</Long>

</LOCATIONCOORDINATES>

<ADDRESS_SEC_3>

<AddressLine1>4386 S MACADAM AVE</AddressLine1>

<AddressLine2>Suite 101</AddressLine2>

<State>OR</State>

<City>PORTLAND</City>

<Zip>97239</Zip>

</ADDRESS_SEC_3>

</SITELOCATION>

<CONTACTS_REPEATER>

<CONTACTS>

<CONTACTTYPE>Owner</CONTACTTYPE>

<CONTACTPERSON>

<FirstName>Josie</FirstName>

<LastName>Austin</LastName>

<Title>http://www.quailitytestingsite.com</Title>

<Email>josie_austin@windsorsolutions.com</Email>

<AddressLine1>4386 S Macadam Avenue, suite 101</AddressLine1>

<AddressLine2>http://www.quailitytestingsite.com</AddressLine2>

<State>Oregon</State>

<Country>United States</Country>

<City>Portland</City>

<Zip>97229</Zip>

<PhoneType>MAIN</PhoneType>

<PhoneNumber>5036757833</PhoneNumber>

</CONTACTPERSON>

</CONTACTS>

<CONTACTS>

<CONTACTTYPE>Operator</CONTACTTYPE>

<CONTACTPERSON>

<FirstName>Wayne</FirstName>

<LastName>Boyle</LastName>

<Title>http://www.quailitytestingsite.com</Title>

<Email>wayne_boyle@windsorsolutions.com</Email>

<AddressLine1>4386 S Macadam Avenue, suite 101</AddressLine1>

<AddressLine2>http://www.quailitytestingsite.com</AddressLine2>

<State>Oregon</State>

<Country>United States</Country>

<City>Portland</City>

<Zip>97229</Zip>

<PhoneType>MAIN</PhoneType>

<PhoneNumber>5036757833</PhoneNumber>

</CONTACTPERSON>

</CONTACTS>

</CONTACTS_REPEATER>

In the above example, the forms includes three sections: Company, Site Location and Contacts.

...

A discrete section will be represented as a complex type, utilizing the Section Tags as the name for the complex type.

<[Section Tag]>

[Controls…]

</[Section Tag]>

For example:

<DISCRETESECTION>

<CONTROL1>ABC</CONTROL1>

<CONTROL2>XYZ</CONTROL2>

</DISCRETESECTION>

Repeating Section

A repeating section will be represented as multiple complex types, one representing the grouping of repeated elements and one representing each set of repeated elements within the section. The grouping of repeated elements complex type is identified as the Section Tag name plus “_REPEATER” and the complex type representing each set of repeated elements is identified as the Section Tag name.

<[Section Tag]_REPEATER>

<[Section Tag]>

[Controls…]

</[Section Tag]>

</[Section Tag]_REPEATER>

A repeating section will be represented as depicted in the example below:

<REPEATINGSECTION_REPEATER>

<REPEATINGSECTION>

<CONTROL1>ABC</CONTROL1>

<CONTROL2>XYZ</CONTROL2>

</REPEATINGSECTION>

<REPEATINGSECTION>

<CONTROL1>BCD</CONTROL1>

<CONTROL2>WXY</CONTROL2>

</REPEATINGSECTION>

<REPEATINGSECTION>

<CONTROL1>CDE</CONTROL1>

<CONTROL2>VWX</CONTROL2>

</REPEATINGSECTION>

</REPEATINGSECTION_REPEATER>

Controls

Simple Text Controls

...

A simple text control will follow this format:

<[Control Tag]>[Simple Control Value]</[Control Tag]>

Simple text control values will be represented as depicted in the example below:

<FACILITYNAME>Acme Corp.</FACILITYNAME >

Note: the max length will be enforced based on the max length configured for the control.

...

A Single Select control will follow this format:

<[Control Tag]>

<Value>[Selected Value]</Value>

</[Control Tag]>

For example:

< FACILITYTYPE >

<Value>Incinerator</Value>

</FACILITYTYPE >

Multiple Select controls support the selection of zero or more values.

A Multiple Select control will follow this format:

<[Control Tag]>

<Value>[Selected Value]</Value>

<Value>[Selected Value]</Value>

<Value>[Selected Value]</Value>

</[Control Tag]>

For example:

<FACILITYTYPE>

<Value>Incinerator</Value>

<Value>Storage Facility</Value>

</FACILITYTYPE>

Formatted Controls

Formatted controls are values stored in controls such as Number, Date, Time, Email, URL and Phone.

...

Formatted controls will follow this format:

<[Control Tag]>[Formatted Control Value]</[Control Tag]>

Formatted control values will be represented as depicted in the six examples below:

<TANKHEIGHTMETERS>2.45</TANKHEIGHTMETERS >

<PERMITSTARTDATE>2021-07-21</PERMITSTARTDATE >

<SHIFTSTARTTIME>08:00:00</SHIFTSTARTTIME >

<OWNEREMAILADDRESS>test@test.com</OWNEREMAILADDRESS >

<COMPANYWEBSITE>https://www.acme.com</COMPANYWEBSITE >

<PRIMARYPHONENUMBER>555-555-5555</PRIMARYPHONENUMBER >

Note: the max length will be enforced based on the max length configured for the control.

...

The Name control will follow this format:

<[Control Tag]>

<Name>[Name Value]</Name>

<Title>[Title Value]</Title>

</[Control Tag]>

The Name control values will be represented as depicted in the example below:

<OWNER>

<Name>Michael Jordon</Name>

<Title>Flight Leader</Title>

</OWNER>

Location Control

The Location control values are represented as two simple types within a complex type assigning the control Tag name as the name of the complex type. Within the complex type are two attributes, Lat and Long. The Latitude and longitude values can be negative positive decimal values.

The Location control will follow this format:

<[Control Tag]>

<Lat>[Lat Value]</Lat>

<Long>[Long Value]</Long>

</[Control Tag]>

The Location control values will be represented as depicted in the example below:

< LOCATIONCOORDINATES >

<Lat>34.740768385792386</Lat>

<Long>-92.31431908835937</Long>

</LOCATIONCOORDINATES>

Address Control

The Address control values are represented as multiple simple types within a complex type assigning the control Tag name as the name of the complex type. Within the complex type there are multiple attributes, such as AddressLine1, AddressLine2, LocationDescription, State, Country, County, City and Zip. These attributes are string values.

...

The Address control will follow this format:

<[Control Tag]>

<AddressLine1>[Address Line 1 Value]</AddressLine1>

<AddressLine2>[Address Line 2 Value]</AddressLine2>

<LocationDescription>[Location Description Value]</LocationDescription>

<State>[State Value]</State>

<Country>[Country Value]</Country>

<County>[County Value]</County>

<City>[City Value]</City>

<Zip>[Zip Value]</Zip>

</[Control Tag]>

The Address control values will be represented as depicted in the example below:

< SITEADDRESS >

<AddressLine1>111 SW 1st Ave</AddressLine1>

<AddressLine2>Suite 101</AddressLine2>

<LocationDescription>Milepoint 24</LocationDescription>

<State>OR</State>

<Country>United States</Country>

<County>Multnomah</County>

<City>Portland</City>

<Zip>97223</Zip>

</SITEADDRESS>

Contact Control

The Contact control values are represented as multiple simple types within a complex type assigning the control Tag name as the name of the complex type. Within the complex type there are multiple attributes, such as FirstName, LastName, Title, Email, AddressLine1, AddressLine2, LocationDescription, State, Country, County, City, Zip, Phones, Phone Number, etc. These attributes are string values and some (e.g., phone/email are valid for basic formatting compliance).

...

The Contact control with support for a single phone number will follow this format:

<[Control Tag]>

<Salutation>[Salutation Value]</Salutation >

<FirstName>[First Name Value]</FirstName>

<MiddleName>[Middle Name Value]</MiddleName>

<LastName>[Last Name Value]</LastName>

<Title>[Title Value]</Title>

<Email>[Email Value]</Email>

<AddressLine1>[Address Line 1 Value]</AddressLine1>

<AddressLine2>[Address Line 2 Value]</AddressLine2>

<LocationDescription>[Location Description Value]</LocationDescription>

<State>[State Value]</State>

<Country>[Country Value]</Country>

<County>[County Value]</County>

<City>[City Value]</City>

<Zip>[Zip Value]</Zip>

<PhoneType>[Phone Type Value]</PhoneType>

<PhoneNumber>[Phone Value]</PhoneNumber>

<PhoneExtension>[Phone Extension Value]</PhoneExtension>

</[Control Tag]>

The Contact control values with support for a single phone number will be represented as depicted in the example below:

<SITECONTACT >

<Salutation>Dr.</Salutation >

<FirstName>Jim</FirstName>

<MiddleName>Merle</MiddleName>

<LastName>Johnson</LastName>

<Title>Project Manager</Title>

<Email>test@test.com</Email>

<AddressLine1>111 SW 1st Ave</AddressLine1>

<AddressLine2>Suite 101</AddressLine2>

<LocationDescription>Milepoint 24</LocationDescription>

<State>OR</State>

<Country>United States</Country>

<County>Multnomah</County>

<City>Portland</City>

<Zip>97223</Zip>

<PhoneType>BUSINESS</PhoneType>

<PhoneNumber>555-555-5555</PhoneNumber>

<PhoneExtension>212</PhoneExtension>

</SITECONTACT>

Support for multiple phone numbers

The Contact control with support for a multiple phone numbers will follow this format:

<[Control Tag]>

<Salutation>[Salutation Value]</Salutation >

<FirstName>[First Name Value]</FirstName>

<MiddleName>[Middle Name Value]</MiddleName>

<LastName>[Last Name Value]</LastName>

<Title>[Title Value]</Title>

<Email>[Email Value]</Email>

<AddressLine1>[Address Line 1 Value]</AddressLine1>

<AddressLine2>[Address Line 2 Value]</AddressLine2>

<LocationDescription>[Location Description Value]</LocationDescription>

<State>[State Value]</State>

<Country>[Country Value]</Country>

<County>[County Value]</County>

<City>[City Value]</City>

<Zip>[Zip Value]</Zip>

<Phones>

<BUSINESS>

<PhoneNumber>[Business Phone Value]</PhoneNumber >

<PhoneExtension>[Business Phone Extension Value]</PhoneExtension >

</BUSINESS>

<MAIN>

<PhoneNumber>[Main Phone Value]</PhoneNumber >

<PhoneExtension>[Main Phone Extension Value]</PhoneExtension >

</MAIN>

<HOME>

<PhoneNumber>[Home Phone Value]</PhoneNumber >

</HOME>

<MOBILE>

<PhoneNumber>[Mobile Phone Value]</PhoneNumber >

</MOBILE>

<OTHER>

<PhoneNumber>[Other Phone Value]</PhoneNumber >

<PhoneExtension>[Other Phone Extension Value]</PhoneExtension >

</OTHER>

</Phones >

</[Control Tag]>

The Contact control values with support for multiple phone numbers will be represented as depicted in the example below:

< SITECONTACT >

<Salutation>Dr.</Salutation >

<FirstName>Jim</FirstName>

<MiddleName>Merle</MiddleName>

<LastName>Johnson</LastName>

<Title>Project Manager</Title>

<Email>test@test.com</Email>

<AddressLine1>111 SW 1st Ave</AddressLine1>

<AddressLine2>Suite 101</AddressLine2>

<LocationDescription>Milepoint 24</LocationDescription>

<State>OR</State>

<Country>United States</Country>

<County>Multnomah</County>

<City>Portland</City>

<Zip>97223</Zip>

<Phones>

<BUSINESS>

<PhoneNumber>555-555-5555</PhoneNumber >

<PhoneExtension>555</PhoneExtension >

</BUSINESS>

<MAIN>

<PhoneNumber>444-444-4444</PhoneNumber >

<PhoneExtension>444</PhoneExtension >

</MAIN>

<HOME>

<PhoneNumber>222-222-2222</PhoneNumber >

</HOME>

<MOBILE>

<PhoneNumber>111-111-1111</PhoneNumber >

</MOBILE>

<OTHER>

<PhoneNumber>777-777-7777</PhoneNumber >

<PhoneExtension>777</PhoneExtension >

</OTHER>

</Phones >

</SITECONTACT>

Advanced Table Control

The Advanced Table control values are represented as multiple control types (simple and/or complex) within a complex type. The Advanced Table Tag will be assigned to the Advanced Table control complex type. Each row within the table will be represented with the ITEM tag. Each individual control will be Tagged with the individual control Tag name as configured within the table. Note: The configuration of the individual controls will follow the same rules/patterns as discussed in prior topics within this document.

The Advanced Table control will follow this format:

<[Control Tag]>

<ITEM>

[Individual Controls….]

</ITEM>

<ITEM>

[Individual Controls….]

</ITEM>

<ITEM>

[Individual Controls….]

</ITEM>

</[Control Tag]>

The Advanced Table control values will be represented as depicted in the example below:

<ANIMALS >

<ITEM>

<ANIMALTYPE>Frog</ANIMALTYPE>

<ANIMALCOUNT>43</ANIMALCOUNT>

<WHERELOCATED>

<VALUE>In Stream</VALUE>

</WHERELOCATED>

</ITEM>

<ITEM>

<ANIMALTYPE>Salmon</ANIMALTYPE>

<ANIMALCOUNT>3</ANIMALCOUNT>

<WHERELOCATED>

<VALUE>In Stream</VALUE>

</WHERELOCATED>

</ITEM>

<ITEM>

<ANIMALTYPE>Wolf</ANIMALTYPE>

<ANIMALCOUNT>1</ANIMALCOUNT>

<WHERELOCATED>

<VALUE>Plains</VALUE>

</WHERELOCATED>

</ITEM>

</ANIMALS>

[Bulk Upload] Table Control

...

The Bulk Upload Table control will follow this format:

<[Control Tag]>[Table Data Value]</[Control Tag]>

The Bulk Upload Table control values will be represented as depicted in the example below:

< UPLOADTABLE> Column 1 Column 2 Column 3

A 1 9

B 2 8

C 3 7

D 4 6 </UPLOADTABLE>

Testing/Validating XML Document

...

Anchor
AppendixExampleXMLDocument
AppendixExampleXMLDocument
Appendix A – Example XML Document

<?xml version="1.0" encoding="utf-8"?>

<PAYLOAD>

<SUBMISSION>

<FormMetaData>

<FormName>XML Import Demo (Do Not Delete)</FormName>

<FormTag>XMLImportDemo</FormTag>

<FormVersion>

<MajorVersion>1</MajorVersion>

<MinorVersion>1</MinorVersion>

</FormVersion>

</FormMetaData>

<SIMPLECONTROLSSECTION>

<REPEAT_NAME_SEC_1>Repeater Record 1</REPEAT_NAME_SEC_1>

<SHORT_TEXT_SEC_1>Short Text</SHORT_TEXT_SEC_1>

<PARAGRAPH_SEC_1>sample paragraph</PARAGRAPH_SEC_1>

<SINGLE_SELECT_SEC_1>

<Value>1- State of Hawaii</Value>

</SINGLE_SELECT_SEC_1>

<MULTIPLESELECT_SEC_1>

<Value>Mailed letter</Value>

<Value>Text Message</Value>

</MULTIPLESELECT_SEC_1>

<SSN_SEC_1>111111111</SSN_SEC_1>

</SIMPLECONTROLSSECTION>

<FORMATTEDCONTROLSSECTION>

<NUMBER_SEC_2>1.0000</NUMBER_SEC_2>

<DATE_SEC_2>2021-07-21</DATE_SEC_2>

<TIME_SEC_2>12:22:00</TIME_SEC_2>

<EMAIL_SEC_2>test@test.com</EMAIL_SEC_2>

<URL_SEC_2>http://cnn.com</URL_SEC_2>

<PHONE_SEC_2>555-555-5555</PHONE_SEC_2>

</FORMATTEDCONTROLSSECTION>

<ADVANCEDCONTROLSSECTION>

<NAME_SEC_3>

<Name>Sally</Name>

<Title>Wing</Title>

</NAME_SEC_3>

<LOCATION_SEC_3>

<Lat>34.740768385792386</Lat>

<Long>-92.31431908835937</Long>

</LOCATION_SEC_3>

<ADDRESS_SEC_3>

<AddressLine1>111 SW 1st St</AddressLine1>

<AddressLine2>address line 2 text</AddressLine2>

<LocationDescription>location description text</LocationDescription>

<State>OR</State>

<Country>United States</Country>

<County>Multnomah</County>

<City>Tigard</City>

<Zip>97223</Zip>

</ADDRESS_SEC_3>

<TABLE_SEC_3>Column 1 Column 2 Column 3

A 1 9

B 2 8

C 3 7

D 4 6</TABLE_SEC_3>

<CONTACT_SEC_3>

<Salutation>Dr.</Salutation>

<FirstName>Jim</FirstName>

<MiddleName>Merle</MiddleName>

<LastName>Johnson</LastName>

<Title>Project Manager</Title>

<Email>test@test.com</Email>

<AddressLine1>222 NW 2nd Ave</AddressLine1>

<AddressLine2>address line 2 text</AddressLine2>

<LocationDescription>location description text</LocationDescription>

<State>OR</State>

<Country>United States</Country>

<County>Multnomah</County>

<City>Tigard</City>

<Zip>97223</Zip>

<Phones>

<BUSINESS>

<PhoneNumber>222-222-2222</PhoneNumber>

<PhoneExtension>212</PhoneExtension>

</BUSINESS>

<MAIN>

<PhoneNumber>555-555-5555</PhoneNumber>

<PhoneExtension>111</PhoneExtension>

</MAIN>

<HOME>

<PhoneNumber>222-222-2222</PhoneNumber>

</HOME>

<MOBILE>

<PhoneNumber>333-333-3333</PhoneNumber>

</MOBILE>

<OTHER>

<PhoneNumber>444-444-4444</PhoneNumber>

<PhoneExtension>444</PhoneExtension>

</OTHER>

</Phones>

</CONTACT_SEC_3>

</ADVANCEDCONTROLSSECTION>

<ADVANCEDTABLESECTION>

<ADV_TABLE_SEC_4>

<ITEM>

<SHORT_AT>Jumpy</SHORT_AT>

<SINGLE_AT>

<Value>frog</Value>

</SINGLE_AT>

<NUMBER_AT>8</NUMBER_AT>

</ITEM>

<ITEM>

<SHORT_AT>High</SHORT_AT>

<SINGLE_AT>

<Value>bird</Value>

</SINGLE_AT>

<NUMBER_AT>4</NUMBER_AT>

</ITEM>

<ITEM>

<SHORT_AT>Loud</SHORT_AT>

<SINGLE_AT>

<Value>dog</Value>

</SINGLE_AT>

<NUMBER_AT>2</NUMBER_AT>

</ITEM>

</ADV_TABLE_SEC_4>

</ADVANCEDTABLESECTION>

<REPEATINGSECTION_REPEATER>

<REPEATINGSECTION>

<SHORTTEXTINREPEATER>Test text section 1</SHORTTEXTINREPEATER>

</REPEATINGSECTION>

<REPEATINGSECTION>

<SHORTTEXTINREPEATER>Test text section 2</SHORTTEXTINREPEATER>

</REPEATINGSECTION>

<REPEATINGSECTION>

<SHORTTEXTINREPEATER>Test text section 3</SHORTTEXTINREPEATER>

</REPEATINGSECTION>

</REPEATINGSECTION_REPEATER>

</SUBMISSION>

</PAYLOAD>