function StringToX3DClassic(const s: string): string;
String encoded for VRML/X3D classic, surrounded by double quotes. You can use this when generating VRML/X3D content by hand.
Simply put, this just adds double quotes around and prepends backslash to all " and \ inside. Fortunately, no other characters (including newlines) need to be quoted in any special way for VRML/X3D. For example:
String encoded for X3D XML, surrounded by double quotes. You can use this when generating VRML/X3D content by hand.
Simply put, this just adds double quotes around and replaces all special characters (quotes, double quotes and more) with appropriate XML entities &xxx;.
function StringToX3DXmlMulti(const s: string): string;
String encoded for X3D XML, surrounded by double quotes, to be used as part of MFString.
In addition to what StringToX3DXml does, this additionally adds backslash before " (double quotes), and doubles existing backslashes. Otherwise XML reader may not tell the difference between double quotes delimiting single string item and double quotes inside, as it has to (and DOM units do) treat " and " exactly the same. X3D XML encoding spec shows example confirming this is correct, <Text string='"He said, \"Immel did it!\""' />.
vtOpenCurlyBracket: Symbols for all VRML versions.
vtCloseCurlyBracket:
vtOpenSqBracket:
vtCloseSqBracket:
vtOpenBracket: Symbols below are only for VRML <= 1.0. In VRML 2.0, they are no longer valid symbols (comma is even considered a whitespace). They will never be returned by lexer when reading VRML >= 2.0 files.
vtCloseBracket:
vtBar:
vtComma:
vtPeriod: Symbols below are only for VRML >= 2.0. They will never be returned by lexer when reading VRML < 2.0 files.
vtColon: Symbols below are only for VRML >= 3.0, that is X3D. They will never be returned by lexer when reading VRML < 3.0 files.
vtFloat: Back to version-neutral tokens, suitable for all VRML / X3D versions.
vtInteger:
vtString:
vtEnd: vtEnd means that we're standing at the end of stream, no more tokens. From this point, further reads using NextToken from stream will always result in vtEnd (they will not raise an error).
Error when reading VRML/X3D. For now, just equal to EX3DClassicReadError, later may be an ancestor to EX3DClassicReadError. Problems in other encodings (XML) are for now always turned into warnings.