Skip to main content
Skip to content
Back to Glossary
File Format

SGML (Standard Generalized Markup Language)

A meta-language for defining markup languages, and the original basis for OFX 1.x file format (before OFX 2.x moved to XML). OFX 1.x files use SGML syntax without closing tags.

Understanding SGML (Standard Generalized Markup Language)

SGML (Standard Generalized Markup Language) is a meta-language for defining markup languages — essentially a set of rules for creating structured document formats. Published as ISO 8879 in 1986, SGML is the ancestor of both HTML and XML, and it is the original syntax used by OFX version 1.x files.

The key characteristic of SGML that distinguishes OFX 1.x from OFX 2.x is that SGML allows elements without closing tags. In OFX 1.x, you write <TRNAMT>1500.00 without a </TRNAMT> closing tag. In OFX 2.x (which uses XML), closing tags are mandatory: <TRNAMT>1500.00</TRNAMT>.

Understanding the difference between SGML-based OFX 1.x and XML-based OFX 2.x is important when working with financial files, because parsers designed for one version may not correctly handle the other. Most bank-generated OFX files still use the 1.x SGML syntax.

Why It Matters for Ecommerce

If you're troubleshooting QBO or OFX import issues, understanding SGML vs. XML syntax helps you read the file and identify formatting problems. OFX 1.x files (SGML) look different from OFX 2.x files (XML) even though they carry the same data. PrimeConnect handles both versions automatically, but knowing the difference helps when manually inspecting files.

Practical Example

OFX 1.x (SGML): <STMTTRN><TRNTYPE>CREDIT<DTPOSTED>20260215<TRNAMT>1500.00<FITID>ABC123<NAME>Amazon Payout OFX 2.x (XML): <STMTTRN><TRNTYPE>CREDIT</TRNTYPE><DTPOSTED>20260215</DTPOSTED><TRNAMT>1500.00</TRNAMT><FITID>ABC123</FITID><NAME>Amazon Payout</NAME></STMTTRN> Same data, different syntax.

Related Tools

Free PrimeConnect tools related to sgml (standard generalized markup language)

Put This Knowledge Into Practice

Now that you understand sgml (standard generalized markup language), use PrimeConnect's free accounting tools to convert your ecommerce data into QuickBooks-ready formats — 100% browser-based.

Browse Free Tools