Page 1 of 1

XML

Posted: Sat Feb 09, 2013 7:10 pm
by gtisdale
More and more I am running into states equesting or requiring payroll tax documents in XML format. So I need to be able to create an XML document that is "Well Formed" with various levels of nesting.

In doing this I have come up with a few librry functions that will create the file and keep track of the nesting. There are still some niceties to add tot he program, like tracking titles in the nesting, but that is readily apparent when you look at the document that is produced.

The system consists of two functions FNXMLROOT and FNXML

FNXMLROOT opens the XML output file, adds the standatd header "?xml version....." and sets the ROOT Instance

FNXML is the used to add each additional line tot he file in the syntax

FNXML(TAG$,DATA$,end)
TAG$ is the name of the element
DATA$ is the value to be included
END is the number 1 if the element is to be ended on the same line or ) or non-existent if the line is a title element.

Entering a sunsequent FNXML with no parameters terminates any open element

Finally FNXMLROOT with no parameters terminates the ROOT element

Attached is a smple program.

I will attach the library separately to a new email.

FNGeorge

Posted: Sat Feb 09, 2013 7:15 pm
by gtisdale
Library for the XML file creation.

Rename it to .DLL from .br

FNGeorge

Posted: Sun Feb 24, 2013 8:26 am
by gtisdale
The XMLLIB that I posted earlier had a capitalization problem with one of the parameters which casued it not to work with a SCHEMA.


schemalocation should have been schemaLocation.

The attched file corrects this problem.

The file expects to be renamed to XMLLIB.dll

FNGeorge