Code Monkey home page Code Monkey logo

fp1's Introduction

My Library: HTML: Parsing Library

My name: John Adams

Narrative: Exploring the HTML Parsing Library, (after a misunderstanding- I believed a line of code to be user-entered in the console, when it was really part of the coding within DrRacket) I've been able to create two HTML 'strings' of three segments, or parts: a 'head' and two 'paragraph' pieces, contained in the body segment.

I was then able to have both HTML strings print to the console, using the two require code-pieces at the bottom-

#lang racket

(require html)

(module html-test1 racket
...)

(module html-test2 racket
...)

(require 'html-test1)
(require 'html-test2)

The two (require 'html-test)'s I had originally believed to be entered into the console, when they were part of the code itself. I finally found out I was incorrect, and the two printed to the screen properly.

screen-fp1

Roughly in the middle of the above screen shot, there is a define:

(define an-html
    (h:read-xhtml
     (open-input-string
      (string-append
       "<html><head><title>Fred Martin</title></head><body>"
       "<p>Teaches OPL on Mondays, Wednesdays, and Fridays</p><p><b>From 12pm to 1pm</b></p>"
       "</body></html>"))))

This is the first, three-piece HTML string- the Header, and two Paragraph segments, contained in the body. This HTML-String is contained in html-test1, the first custom module.

The output can be seen at the bottom of the screenshot, in the REPL.

If it is too small, here it is as well: screen-fp1-2

fp1's People

Contributors

jadamsuml avatar marksherman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.