Incremental Hierarchical File Parser for XML

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Hierarchical data storage systems, such as XML files, face challenges with incremental updates and error handling, where direct edits can break the file structure, leading to time-consuming reloading and parsing issues due to the fragility of large files and the complexity of maintaining hierarchical integrity.

Innovation Solution

An incremental hierarchical file parser is developed to create a tree representation of the file, allowing updates to be processed incrementally, with intelligent error handling to maintain the file's integrity by appending mismatched tags and updating only affected nodes, enabling continuous parsing without requiring a full reload.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If the entire XML file is loaded into memory before querying, then querying can be as fast as the processor can handle, but the cost of loading the XML file in memory is high and reloading is time-consuming for frequent modifications

Engineering Contradiction:
Improvequerying speedVSAvoidloading time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent divides the XML file into multiple segments or chunks that can be loaded and processed independently. Instead of loading the entire file into memory at once, the system loads only the necessary segments required for the current query operation, thereby reducing memory usage and loading time while maintaining fast querying performance on the loaded portions.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If direct edits are made to large XML files, then modification is simple, but the file structure can be broken and parsing fails

Engineering Contradiction:
Improvemodification easeVSAvoidfile structure integrity
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent performs preliminary validation and structure verification before allowing direct edits to the XML file. The system checks the file structure, identifies safe edit regions, and prepares the necessary contextual information in advance, enabling users to make modifications with confidence that the overall structure will remain intact and parseable.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary layer or wrapper that mediates between direct file edits and the XML structure. This intermediary monitors and manages edit operations, ensuring that modifications maintain proper hierarchical structure and syntax, thereby preventing file breakage while allowing straightforward editing operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Manufacturing precision

If the entire file is reparsed after modification, then the tree structure is updated accurately, but the process is time-consuming for frequent updates

Engineering Contradiction:
Improvetree structure accuracyVSAvoidreparse time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The patent extracts only the modified portions or affected segments from the XML file for reparsing, rather than reparsing the entire file. By identifying and isolating the specific changes, the system updates the tree structure with high accuracy for the modified areas while skipping the processing of unchanged portions, dramatically reducing reparse time for frequent updates.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies different processing quality levels to different parts of the file based on their modification status. Highly accurate complete reparsing is applied only to modified segments where structure accuracy is critical, while unchanged segments are updated through faster incremental methods or cached from previous parses, optimizing the balance between accuracy and speed.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS7747633B2Incremental parsing of hierarchical files
Publication Date: 2010.06.29 MICROSOFT TECHNOLOGY LICENSING LLC
  • US7747633B2 patent drawing
  • US7747633B2 patent drawing
  • US7747633B2 patent drawing

AI summary

An incremental parser for hierarchical files is provided where the file can be parsed into a tree representation. Changes to the file can effectuate incremental changes to the tree such that the whole hierarchical file need not be reparsed; the incremental change modifies the necessary portions of the tree, not necessarily the entire tree. Moreover, the incremental parser can intelligently handle errors related to modification of the hierarchical file, such as unmatched tags corresponding to unmatched nodes in the tree. Such error handling provides operability with the malformed hierarchical file rather than providing an error and/or rejecting the file as modified.