Create HTMLParser module.

This commit is contained in:
Brent Simmons 2024-09-21 12:16:09 -07:00
parent 6959e1f891
commit 3c4a278b42
4 changed files with 57 additions and 0 deletions

View File

@ -63,6 +63,20 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "HTMLParser"
BuildableName = "HTMLParser"
BlueprintName = "HTMLParser"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction

View File

@ -20,6 +20,10 @@ let package = Package(
name: "OPMLParser",
type: .dynamic,
targets: ["OPMLParser"]),
.library(
name: "HTMLParser",
type: .dynamic,
targets: ["HTMLParser"]),
.library(
name: "DateParser",
type: .dynamic,
@ -39,6 +43,14 @@ let package = Package(
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]),
.target(
name: "HTMLParser",
dependencies: [
"SAX"
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency")
]),
.target(
name: "FeedParser",
dependencies: [

View File

@ -0,0 +1,15 @@
//
// HTMLLink.swift
//
//
// Created by Brent Simmons on 9/21/24.
//
import Foundation
public final class HTMLLink {
let urlString: String? // Absolute URL string
let text: String?
let title: String? // Title attribute inside anchor tag
}

View File

@ -0,0 +1,16 @@
//
// File.swift
//
//
// Created by Brent Simmons on 9/21/24.
//
import Foundation
import SAX
public final class HTMLLinkParser {
public static func htmlLinks(parserData: ParserData) -> [HTMLLink] {
}
}