KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Opening documents for SAX Parsing
PRODUCT: 4D | VERSION: 2004.1 | PLATFORM: Mac & Win
Published On: May 19, 2005

In 4D 2004, SAX parsing was introduced. Using this method, a user could achieve better performance on simple XML documents than with DOM parsing.

In 2004 it was possible to open a document using the Open Document command in read write mode as follows:

$docRef:=Open document("";"XML")

With 2004.1 it is now mandatory to open the document in Read-only mode:

$docRef:=Open document("";"XML";Read Mode )

The reason for this is to prevent any file locking conflicts between Xerces, the library that parses XML, and 4D. If SAX parsing is attempted on a document that has been opened in Read-Write mode, an alert will be displayed.