Platforms to show: All Mac Windows Linux Cross-Platform

/Tidy/Tidy HTML Tree
Feedback.

Function:
You find this example project in your Plugins Download as a Realbasic project file within the examples folder: /Tidy/Tidy HTML Tree
This example is the version from Thu, 6th Jan 2010.
Notes: Last modified: Thu, 6th Jan 2010
Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete
End Class

Class Window1
Inherits Window
// Controls
ControlInstance
End ControlInstance
ControlInstance
Sub Action() Handles Event
work
End Sub
End ControlInstance
ControlInstance
End ControlInstance

// Methods
Private Sub Work()
dim input As String = ef.Text
if input = "" Then
Beep
Return
end if


dim t as TidyDocumentMBS

t=new TidyDocumentMBS
t.OptionXhtmlOut=True
call t.ParseString(input)
call t.CleanAndRepair
'call t.RunDiagnostics
't.OptionForceOutput=true

dim s As String=t.SaveString

dim n as TidyNodeMBS=t.Body
while n<>nil
ParseNode(n)
n=n.NextNode
wend
End Sub
Private Sub ParseNode(node As TidyNodeMBS)
While node <> nil
dim s As String // for observing node content in the debugger

s = node.Text

Listbox1.AddRow s

dim c As TidyNodeMBS = node.Child
if c <> nil Then
ParseNode c
end if

node = node.NextNode

Wend
End Sub
End Class


See also:




Links
MBS Realbasic Chart Plugins - Pfarrgemeinde Messdiener Nickenich