Innov-AI     Services     Supporters     Contact     About    
HTML

HTML parser.

html load_from_strhtml load_from_urlhtml closehtml close_allhtml showhtml existhtml elementhtml parsejson parse_objjson parse_array

html load_from_str <domId> <html>


Description

    Load a HTML document from a string

Parameters

    domId:   The DOM id - string - required
    html:   The html - string - required
admin
html load_from_str "domId1" "...";
mentdb
1

html load_from_url <domId> <url> <method> <timeout> <jsonHeaders> <jsonCookies> <jsonData>


Description

    Load a HTML document from an url

Parameters

    domId:   The DOM id - string - required
    url:   The url - string - required
    method:   The method (GET|POST) - string - required
    timeout:   The timeout (ex: 5000) - number - required
    jsonHeaders:   The JSON headers key map - string - required
    jsonCookies:   The JSON cookies key map - string - required
    jsonData:   The JSON data key map - string - required
admin
html load_from_url "domId1" "https://www.tripadvisor.fr/Hotel_Review-g298470-d1473791-Reviews-LUX_Saint_Gilles-Saint_Gilles_Les_Bains_Arrondissement_of_Saint_Paul.html" "get" 5000 "{}" "{}" "{}";
mentdb
1

html close <domId>


Description

    Close a document

Parameters

    domId:   The DOM id - string - required
admin
html close "domId1";
mentdb
1

html close_all


Description

    Close all documents

admin
html close_all;
mentdb
2

html show


Description

    To show all open documents

admin
html show
mentdb
["domId1"];

html exist <domId>


Description

    To check if a document already exist

Parameters

    domId:   The DOM id - string - required
admin
html exist "domId1"
mentdb
1

html element <domId> <jsonDoc> <id>


Description

    To load a HTML element into a json object

Parameters

    domId:   The DOM id - string - required
    jsonDoc:   The JSON document id - string - required
    id:   The element id - string - required
admin
html element "domId1" "jsonDoc1" "id"
mentdb
1

html parse <domId> <jsonDoc> <searchType> <key> <value> <mqlActions>


Description

    To execute actions on HTML elements (JSOUP syntaxe)

Parameters

    domId:   The DOM id - string - required
    jsonDoc:   The JSON document id - string - required
    searchType:   The search type (TAG | ATTRIBUTE | SELECT | CLASS | ATTRIBUTE_VALUE | CONTAINING_OWN_TEXT | CONTAINING_TEXT | OWN_TEXT_REGEX | TEXT_REGEX | ATTRIBUTE_STARTING | ATTRIBUTE_VALUE_CONTAINING | ATTRIBUTE_VALUE_ENDING | ATTRIBUTE_VALUE_REGEX | ATTRIBUTE_VALUE_NOT | ATTRIBUTE_VALUE_STARTING) - string - required
    key:   The key - string - required
    value:   The value - string - required
    mqlActions:   The MQL actions - string - required
admin
html parse "domId1" "jsonDoc1" "TAG" "a" "" { #Here your MQL source code ...; json select "jsonDoc1" "/text"; json select "jsonDoc1" "/html"; json select "jsonDoc1" "/formVal"; json select "jsonDoc1" "/tagName"; json select "jsonDoc1" "/id"; json select "jsonDoc1" "/nodeName"; json select "jsonDoc1" "/outerHtml"; json select "jsonDoc1" "/ownText"; json select "jsonDoc1" "/wholeText"; json select "jsonDoc1" "/attributes/..."; json select "jsonDoc1" "/classNames[0]"; };
mentdb
1

json parse_obj <docId> <jsonPath> <varKey> <varValue> <mqlActions>


Description

    To execute actions on a JSON object

Parameters

    docId:   The document id - string - required
    jsonPath:   The JSON path - string - required
    varKey:   The key variable (ex: [key]) - string - required
    varValue:   The value variable (ex: [val]) - string - required
    mqlActions:   The MQL actions - string - required
admin
json parse_obj "keyId" "/" "[key]" "[val]" { #Here your MQL source code ...; log trace (concat [key] "=" [val]); };
mentdb

json parse_array <docId> <jsonPath> <varValue> <mqlActions>


Description

    To execute actions on a JSON array

Parameters

    docId:   The document id - string - required
    jsonPath:   The JSON path - string - required
    varValue:   The value variable (ex: [val]) - string - required
    mqlActions:   The MQL actions - string - required
admin
json parse_array "keyId" "/" "[val]" { #Here your MQL source code ...; [val]; };
mentdb




© 2012 - 2023