You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although comment tags do not affect the content of an XML document, parsing them is a standard feature in almost all XML parsers. Implementing this feature in myxml will ensure compatibility and completeness, making the library more robust.
Feature Description
In element.hpp: Create a Comment class as a subclass of the Node class. This class should have functionalities similar to the Text class, allowing comments to be treated as a specific type of node within the DOM.
In parser.hpp: There's no need to create a separate method specifically for parsing comment tags. Instead, enhance the Parser::parseTag method to recognize and handle comment tags. In Parser::ParseElement, when a comment tag is detected, it should be added as a child node of the current element.
The text was updated successfully, but these errors were encountered:
Background
Although comment tags do not affect the content of an XML document, parsing them is a standard feature in almost all XML parsers. Implementing this feature in myxml will ensure compatibility and completeness, making the library more robust.
Feature Description
element.hpp
: Create a Comment class as a subclass of the Node class. This class should have functionalities similar to the Text class, allowing comments to be treated as a specific type of node within the DOM.parser.hpp
: There's no need to create a separate method specifically for parsing comment tags. Instead, enhance theParser::parseTag
method to recognize and handle comment tags. InParser::ParseElement
, when a comment tag is detected, it should be added as a child node of the current element.The text was updated successfully, but these errors were encountered: