Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

XML (X Exrensible Markup Language) text positioning method based on DOM (Document Object Model) model

A text positioning and text technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve problems such as low efficiency and mapping, and achieve the effect of speeding up

Inactive Publication Date: 2014-07-09
ASAT CHINA TECH
View PDF6 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Delete the original DOM model, and then re-parse the XML file or memory data to re-form the DOM model. This method may have little effect on relatively small XML files or memory data, but it is obviously not efficient for large XML files or memory data.
[0005] If you want to modify the local XML text data while maintaining the mapping relationship between the existing DOM model and XML data, so as to quickly map the modified local XML text to the DOM structure and adapt to the XML editing mode of large files, there is A new problem: how to quickly map from the nodes of the DOM structure to the XML text

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • XML (X Exrensible Markup Language) text positioning method based on DOM (Document Object Model) model
  • XML (X Exrensible Markup Language) text positioning method based on DOM (Document Object Model) model
  • XML (X Exrensible Markup Language) text positioning method based on DOM (Document Object Model) model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] In order to make the purpose, technical solution and advantages of the present invention clearer, the following will further describe the implementation of the present invention in detail in conjunction with the accompanying drawings.

[0028] The first embodiment of the present invention relates to a method for locating XML text based on the DOM model, and its specific flow chart is as follows figure 1 shown.

[0029] In step 101, the initial text length, text index and text offset of the node object are stored on the node object of the DOM model; the text index is: the initial position of the XML text of the node object in the entire XML text; the text offset The quantity is: after the XML text of the node object is modified, the difference between the modified text length and the initial text length. In this embodiment, the initial value of the text offset is 0.

[0030] In this step: for a leaf node, the initial text length is the length of all XML texts correspon...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an XML (X Exrensible Markup Language) text positioning method based on a DOM (Document Object Model) model. The method comprises the following steps: storing the text index and text offset of a node object on the node object of the DOM model, wherein the text index is the initial position of the XML text of the node object in a whole XML text, and the text offset is a differential valve between the text length of the modified XML text of the node object and the initial text length; when the node object in the DOM model is selected, positioning an XML text position corresponding to the node object according to the overlapping of the text offsets of all male nodes of the node object and the text index of the node object. Therefore, the XML text position corresponding to the DOM model node object can be quickly positioned without the comparison of text contents.

Description

technical field [0001] The invention relates to an XML text positioning technology, in particular to an XML text positioning technology based on a DOM model. Background technique [0002] DOM (Document Object Model) is a recommendation of W3C (World Wide Web Consortium). DOM defines standards for accessing and manipulating documents such as XML and XHTML. DOM (Document Object Model) is a platform and language-neutral interface that enables programs and scripts to dynamically access and update the content, structure, and style of documents. [0003] XML DOM defines the objects and attributes of all XML elements, and the methods (interfaces) to access them. In other words, XML DOM is a standard for getting, changing, adding or removing XML elements. [0004] The DOM model of the XML document mainly realizes the interaction between the data and the interface, that is, through the XML data description, the data is displayed as text or graphics, and the DOM model is used as a ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/24
Inventor 林吉俞高宇张晓华
Owner ASAT CHINA TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products