Method for filtrating illegal label in marker language
A markup language and labeling technology, applied in the field of fault-tolerant analysis, can solve the problems of users' browsing inconvenience and lack of error handling mechanism, etc., and achieve the effect of enhancing browsing comfort, improving recovery ability, and improving robustness
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0033] A method for filtering illegal tags in a markup language, specifically comprising the following steps:
[0034] 1. Record from the input data stream composed of tags: the position of the tag that is currently being parsed; the position of the last parsed tag; all start tags that have not yet been parsed to their end tags; and during the parsing process, Continuously update the above three record information;
[0035] 2. The first non-annotated and legal tag curTag read from the input data stream composed of tags is the input parameter of the recursive function,
[0036] 3. Store the name and attributes of curTag in a specific data structure,
[0037] 4. Read the next tag from the input data stream, which is recorded as nextTag. If the input data stream has ended, nextTag is empty.
[0038] 5. If the next tag read in nextTag is the start tag, then assign the value of nextTag to curTag, and return to step 2 to start a new recursion.
[0039] 6. If the nex...
Embodiment 2
[0054] If the input tag stream is:
[0055]
[0056]
[0057]
[0058] This wml page has a syntax error: tag missing closing tag .
[0059] Use the 10 steps in Example 1 to parse the page. When proceeding to step 8, it was found that although no The closing tag of the , but it is the opening tag that appeared before The end tag of , so the data flow is rolled back, so that the nextTag read next time is still , and this recursion ends. thus in Virtually inserts a , allowing parsing to continue successfully.
Embodiment 3
[0061] If the input tag stream is:
[0062]
[0063]
[0064]
[0065]
[0066]
[0067] This wml page has a syntax error: tag does not have a matching start tag.
[0068] Use the 10 steps in Example 1 to parse the page. When proceeding to step 9, it is found that it is not The closing tag of the and no preceding opening tag appears, so ignore this label and jump to step 4 to continue reading the next label , so that parsing can continue successfully.
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More - R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com
