[REBOL] Re: parse-xml and build-tag
From: hallvard:ystad:helpinhand at: 8-Oct-2001 11:30
Thanks for the explanation, Joel. Question 1 is now out of the way. But as
for Q2, I still am facing some problems.
I actually am parsing HTML, not XML, so I need a method that will
understand certain things that are illegal in XML. Ex: <table width="100%"
noborder height=75%>. This is valid HTML, I think, or at least it is widely
in use. The parse-xml function understands neither the noborder attribute
nor the height attribute:
>> parse-xml {<table width="100%" noborder height=75%>}
== [document none [["table" ["width" "100%"] none]]]
I once used this method to extract attributes from tags:
ex_att: func [tag attr] [
trim to-string select difference parse tag "<> =" [""] attr
]
but it doesn't get the nobordet attribute right...
Any suggestions (or code), anyone?
~H
Joel Neely skrev (Sunday 07.10.2001, kl. 23.38):