HtmlUtils: An utils extension for HTML

1.Introduction

An utils extension to work with Html.It also supports Html encoding and decoding.

Latest Version: 1
Released: 2020-07-09T18:30:00Z
Last Updated: 2020-07-09T18:30:00Z

2.Blocks

image

image

image

3.Documentation

  • Got Element By Id
    Event raised after getting element by id
    image
    element ~ text
  • Got Elements By Attribute
    Event raised after getting elements list by attribute
    image
    elements ~ list
  • Got Elements By Class
    Event raised after getting elements list by class
    image
    elements ~ list
  • Got Elements By Css Query
    Event raised after getting elements list by css query
    image
    elements ~ list
  • Got Elements By Tag
    Event raised after getting elements list by tag
    image
    elements ~ list
  • Parse Failed
    Event raised if parse failes and gives error
    image
    error ~ text
  • Parse Success
    Event raised if parse was successful
    image
  • Body
    Returns body of html
    image
    Returns : text
  • Decode Html
    Decodes given html text
    image
    Accepts text(html)
    Returns : text
  • Encode Html
    Encodes given html text
    image
    Accepts text(html)
    Returns : text
  • Get Element By Id
    Tries to get element by id
    image
    id ~ text
  • Get Elements By Attribute
    Tries to get elements by attribute
    image
    attribute ~ text
  • Get Elements By Class
    Tries to get elements by class
    image
    className ~ text
  • Get Elements By Css Query
    Tries to get elements by css query
    image
    cssQuery ~ text
  • Get Elements By Tag
    Tries to get elements by tag
    image
    tag ~ text
  • Get Value
    Converts html text to plain text
    image
    Accepts text(html)
    Returns : text
  • Head
    Returns head of html
    image
    Returns : text
  • Parse Html From String
    Tries to parse given html text
    image
    string ~ text
  • Title
    Returns title of html
    image
    Returns : text

4.Downloads

Download Link1: com.sunny.HtmlUtils.aix (218.6 KB)
Download Link2: com.sunny.HtmlUtils.aix - Google Drive

Want to donate
Thank you :blush:

12 Likes

I'm a bit fuzzy on how some of those methods receive input, particularly the head, body, Title blocks and the filter blocks that specify a filter but not the source to filter.

Could you mention which block loads the unseen buffer that feeds those blocks?

1 Like

This looks interesting, but I am missing a few examples of how to use your extension.

1 Like

Hi @ABG and @Ghica
Thank you for interest :slightly_smiling_face:

ParseHtmlFromString method parses Html string which is used to get various information from it.

I shall upload an aia file soon but for now here are some blocks:

I wanted to upload Do it results but due to AI2's lags I am unable to do that :disappointed:

Unfortunately, they failed to drag into my Blocks Editor.

Probably because I have downloaded all blocks instead of a specific block.
AI2 currently supports import of only one image (if I am not wrong)

Hello @vknow360,
I don't understand how to properly use the extension, can you give me some examples please?

Kindly specify which issue are you facing.

1 Like

Is there a video link that shows how to use it?

1 Like

No, you can ask if you face a problem.

It would be nice if you upload a promotional video.

I lost the aia somehow but I'll try to recreate it as soon as possible.

Hello,
I have a question that I hope to find the solution here.

how to pass the value of a label.text to html whose value must contain in a value?
example
app inventor : label1.text=500

AND

html page: <....................value='value of label1.text'>

Hi @Djibril_BINGA , the extension can only parse html values and not set them.