Subject | Hash | Author | Date (UTC) |
---|---|---|---|
add XML parser... | 4f2d6297a47fe2f9f377bf9ce5afd9545cf9ae2f | Alex | 2022-06-18 14:29:17 |
prepare textfield | b88f2e78f55a4ba7e62f674bcdf38615f3d3eb09 | Alex | 2022-06-18 02:35:37 |
initial commit | 702a1b31f80bf565bf20cc6ecc4e9d748d772363 | Alex | 2022-06-17 23:42:13 |
File | Lines added | Lines deleted |
---|---|---|
IvoRSS.hws | 27 | 5 |
File IvoRSS.hws changed (mode: 100755) (index 949a899..45c4b47) | |||
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | 1 | @VERSION 5,2 | @VERSION 5,2 |
7 | 2 | @APPTITLE "IvoRSS" | @APPTITLE "IvoRSS" |
8 | 3 | @APPVERSION "$VER: IvoRSS 0.1 (16.6.22)" | @APPVERSION "$VER: IvoRSS 0.1 (16.6.22)" |
11 | 6 | @APPDESCRIPTION "Simple RSS reader" | @APPDESCRIPTION "Simple RSS reader" |
12 | 7 | @REQUIRE "muiroyale", {Version=1, Revision=7} | @REQUIRE "muiroyale", {Version=1, Revision=7} |
13 | 8 | @REQUIRE "hurl" | @REQUIRE "hurl" |
9 | @REQUIRE "xmlparser" | ||
14 | 10 | @DISPLAY {Hidden=True} | @DISPLAY {Hidden=True} |
15 | 11 | ||
16 | 12 | @FILE 1, "AppWindow.xml" | @FILE 1, "AppWindow.xml" |
... | ... | DownloadFile(url$, {File = "feed.xml", Adapter = "hurl"}) | |
63 | 59 | text$ = FileToString("feed.xml") | text$ = FileToString("feed.xml") |
64 | 60 | mui.Set("textfield", "Text", text$) | mui.Set("textfield", "Text", text$) |
65 | 61 | ||
62 | |||
63 | |||
64 | |||
65 | Function StartElement(p, name$, attrs) | ||
66 | DebugPrint("*** Start Element:", name$) | ||
67 | |||
68 | For i,v In Pairs(attrs) | ||
69 | If GetType(i) = #STRING Then DebugPrint("-->", i .. "=" .. v) | ||
70 | Next | ||
71 | |||
72 | EndFunction | ||
73 | |||
74 | Function EndElement(p, name$) | ||
75 | DebugPrint("*** End Element:", name$) | ||
76 | EndFunction | ||
77 | |||
78 | |||
79 | p = XMLParser.New({StartElement = StartElement, EndElement = EndElement}) | ||
80 | Assert(p:Parse(text$)) | ||
81 | p:Close() | ||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||
87 | |||
66 | 88 | Repeat | Repeat |
67 | 89 | WaitEvent | WaitEvent |
68 | 90 | Forever | Forever |