Binary XML Whitespace Encoding via Opcodes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing XML storage formats, such as Binary XML, do not preserve insignificant whitespace, leading to loss of original formatting when XML data is displayed, as they compress data by ignoring whitespace, resulting in a different visual representation than the original data.
Innovation Solution
Incorporating white space opcodes and operands into the binary XML format to specifically encode and preserve insignificant whitespace, allowing for its accurate reproduction during decoding, and using a flag to indicate whether whitespace was preserved during encoding.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If XML data is stored in Binary XML format to reduce storage size, then storage efficiency is improved, but original insignificant whitespace is lost
Solution Approach 1:
The patent extracts insignificant whitespace from the general XML data stream and stores it separately using specialized whitespace opcodes and operands. This allows the main Binary XML structure to remain compact while preserving whitespace information in a dedicated, space-efficient format.
Solution Approach 2:
The patent changes the representation parameters of whitespace by encoding it as binary data with specific opcodes (e.g., 0x00 for space, 0x01 for tab, 0x02 for newline) rather than storing actual character sequences. This parameter transformation enables compact storage while maintaining the ability to reconstruct original whitespace during decoding.
2Loss of information
If insignificant whitespace is preserved in XML storage, then original formatting is maintained, but storage efficiency decreases
Solution Approach 1:
The patent creates a simplified binary copy of whitespace information using opcode-operand pairs that represent whitespace sequences. Instead of storing actual whitespace characters, it stores compact binary representations that can be decoded back to the original formatting, achieving both preservation and compression.
3Quantity of substance
If XML data is compressed using translation information, then storage compactness is improved, but readability and original visual representation are worsened
Solution Approach 1:
The patent performs preliminary encoding of whitespace during the XML-to-BinaryXML conversion process, embedding whitespace opcodes and operands directly into the binary structure. This preliminary action ensures that whitespace information is preserved in the compressed format, enabling accurate reproduction of original formatting during decoding without requiring separate processing steps.
Data Source
AI summary
Techniques are described for preserving the original insignificant white space of XML data. The techniques may be used in combination with compact XML data storage formats, such as binary XML, to preserve the insignificant white space without requiring as much storage space as uncompressed formats. White space opcodes/operand pairs are described for representing white space characters and white space patterns. The white space opcode/operand pairs represent the white space in binary XML, are use to generate the original white space when the binary XML is decoded back to textual XML data.


