Question 1 Write a GUI program that will parse an XML file to check whether each start tag (such as ) has an end t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 1 Write a GUI program that will parse an XML file to check whether each start tag (such as ) has an end t

Post by answerhappygod »

Question 1 Write A Gui Program That Will Parse An Xml File To Check Whether Each Start Tag Such As Name Has An End T 1
Question 1 Write A Gui Program That Will Parse An Xml File To Check Whether Each Start Tag Such As Name Has An End T 1 (63.96 KiB) Viewed 62 times
Question 1 Write a GUI program that will parse an XML file to check whether each start tag (such as <name>) has an end tag (such as </name>); empty element tags (such as <br/>, where you may assume that such tags have before >) should also be identified, but declaration tags (such as <?xml version="1.0" encoding="UTF-8"?>) can be ignored. You may assume that all the tags are all well-formed, and that there are no tags that are both end and empty element tags. Allow the user to select the file to be checked and use regular expressions to identify tags in the file (try to use just one regular expression to identify both start and end tags). Ensure that the program does not end abruptly if no file is selected, a blank file is selected, or no tags are found for displaying. You are required to use the QRegularExpression class (and not the older QRegExp class). Once the file has been checked, display the following (in order): • Cases where there is a start tag with no end tag. • Cases where there is an end tag with no start tag. • All empty element tags. Tags may contain alphanumeric characters, underscores, or hyphens; you may assume that there are no spaces in the tags. You are not expected to ensure that the tags are correctly nested but are simply checking that each start tag has an end tag and vice versa. Use appropriate OOP design principles when designing your solution. Below is an example of the output. XML file checker Load START TAGS WITH NO END TAGS <food> END TAGS WITH NO START TAGS </sparetag> EMPTY TAGS cempty element 1/ cempty-element-2/> Done i Check X Checking completed OK 2 COS3711/Assignment 2/2022
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply