Package net.bjmsw.hda.vs.bhtml
Class BHTMLParser
java.lang.Object
net.bjmsw.hda.vs.bhtml.BHTMLParser
BHTMLParser class provides methods for parsing and replacing variables in BHTML content.
BHTML (bjmHTML): A simple HTML-like language that allows for variables to be replaced with their values.
Format: The BHTML content must start with the tag <!bhtml>. (This tag is removed during parsing) Variables are defined with curly braces: {VAR_NAME}
-
Constructor Details
-
BHTMLParser
public BHTMLParser()
-
-
Method Details
-
parse
Replaces variables in BHTML content with their corresponding values.- Parameters:
content- the BHTML content to parse and replace variablesvariables- a map containing the variable name-value pairs- Returns:
- the BHTML content with variables replaced by their values
-
parseFile
Parses a file and replaces variables in BHTML content with their corresponding values.- Parameters:
file- the path of the file to parsevariables- a map containing the variable name-value pairs- Returns:
- the BHTML content with variables replaced by their values, or null if an exception occurs
-