Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Re: XHTML Parser (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Return True in EditField.MouseDown and selecting a text with the Mouse
Next thread: Automatically Moving Focus to Next Control


Re: XHTML Parser   -   Theodore H. Smith
   XHTML Parser   -   Thom McGrath
    Re: XHTML Parser   -   Steve Garman
     Re: XHTML Parser   -   Thom McGrath
      Re: XHTML Parser   -   Mark Nutter
       Re: XHTML Parser   -   Thom McGrath
       Re: XHTML Parser   -   Stefan Pantke
      Re: XHTML Parser   -   Steve Garman
       Re: XHTML Parser   -   Brady Duga
     Re: XHTML Parser   -   Brady Duga
    Re: XHTML Parser   -   dda
    Re: XHTML Parser   -   Stefan Pantke

Re: XHTML Parser
Date: 01.08.05 09:54 (Mon, 1 Aug 2005 09:54:46 +0100)
From: Theodore H. Smith
> From: "Steve Garman" <<email address removed>>
> Date: Sun, 31 Jul 2005 22:15:17 +0100
>
>> It fails in that it doesn't parse. I get an XMLException. It does
>> include proper syntax and document type definition.
>>
> It's unusual to get an XMLexception if it is well formed according
> to > its
> DTD
>
> Have you tried validating your XHTML, somewhere like
> <http://validator.w3.org/>

or www.elfdata.com/xmleditor

XHTML Parser
Date: 31.07.05 17:21 (Sun, 31 Jul 2005 12:21:16 -0400)
From: Thom McGrath
I need to parse XHTML. Thought that the built-in XML parser would do
the trick, but it fails. Is there something out there?

Re: XHTML Parser
Date: 31.07.05 17:39 (Sun, 31 Jul 2005 17:39:10 +0100)
From: Steve Garman
> I need to parse XHTML. Thought that the built-in XML parser would do
> the trick, but it fails. Is there something out there?

"It fails" is not the most helpful explanation of how XMLreader does not
live up to your expectations.

Perhaps if you gave some clue as to what you want from a parser, someone
might be able to help.

At one extreme, HTMLviewer has a pretty good stab at rendering XHTML (at
least on Win32)

At the other, if I know exactly what I'm looking for, I can usually find it
using either the xml clases or Instr.

I assume you're looking for something in between, but what?

Re: XHTML Parser
Date: 31.07.05 21:30 (Sun, 31 Jul 2005 16:30:49 -0400)
From: Thom McGrath
Basically, I need to parse custom tags. So I want to be able to step
through the hierarchy and replace tags with content, kind of like
MovableType. Find/Replace does not work in this situation.

It fails in that it doesn't parse. I get an XMLException. It does
include proper syntax and document type definition.

Re: XHTML Parser
Date: 01.08.05 02:02 (Sun, 31 Jul 2005 18:02:31 -0700 (PDT))
From: Mark Nutter


--- Thom McGrath <<email address removed>> wrote:

> It fails in that it doesn't parse. I get an
> XMLException. It does
> include proper syntax and document type definition.

Do you know what exactly it is that is failing to
parse? Is there a link to a sample document we could
take a look at? XHTML or not, if it's valid XML it
should at least parse, and it should be valid XML to
be valid XHTML. Or "well-formed," I should say, since
"valid" has a technical meaning in XML.

Mark Nutter

Quick and easy regex creation and debugging!
http://www.bucktailsoftware.com/products/regexplorer/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: XHTML Parser
Date: 01.08.05 02:56 (Sun, 31 Jul 2005 21:56:18 -0400)
From: Thom McGrath
I will double-check my XHTML code, but I believe it's correct.

Re: XHTML Parser
Date: 01.08.05 03:09 (Mon, 1 Aug 2005 04:09:08 +0200)
From: Stefan Pantke

Am 01.08.2005 um 03:56 schrieb Thom McGrath:

> I will double-check my XHTML code, but I believe it's correct.

Some problems are so subtle, that it takes days to discover them -
especially if your code and your XML if ok ;-)

Please put a sample on a webserver and post a download link.

> On Jul 31, 2005, at 9:02 PM, Mark Nutter wrote:
>
>> Do you know what exactly it is that is failing to
>> parse? Is there a link to a sample document we could
>> take a look at? XHTML or not, if it's valid XML it
>> should at least parse, and it should be valid XML to
>> be valid XHTML. Or "well-formed," I should say, since
>> "valid" has a technical meaning in XML.

Stefan Pantke
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: XHTML Parser
Date: 31.07.05 22:15 (Sun, 31 Jul 2005 22:15:17 +0100)
From: Steve Garman
> It fails in that it doesn't parse. I get an XMLException. It does
> include proper syntax and document type definition.

It's unusual to get an XMLexception if it is well formed according to its
DTD

Have you tried validating your XHTML, somewhere like
<http://validator.w3.org/>

Re: XHTML Parser
Date: 31.07.05 22:19 (Sun, 31 Jul 2005 14:19:49 -0700)
From: Brady Duga

On Jul 31, 2005, at 2:15 PM, Steve Garman wrote:
>
> It's unusual to get an XMLexception if it is well formed according
> to its
> DTD
>
> Have you tried validating your XHTML, somewhere like
> <http://validator.w3.org/>

Well-formedness has nothing to do with the DTD. I don't think Rb uses
a validating parser, so it is unlikely that an invalid document would
throw an XMLException.

--Brady
The La Jolla Underground

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: XHTML Parser
Date: 31.07.05 22:10 (Sun, 31 Jul 2005 14:10:11 -0700)
From: Brady Duga

On Jul 31, 2005, at 1:30 PM, Thom McGrath wrote:

> Basically, I need to parse custom tags. So I want to be able to
> step through the hierarchy and replace tags with content, kind of
> like MovableType. Find/Replace does not work in this situation.
>
> It fails in that it doesn't parse. I get an XMLException. It does
> include proper syntax and document type definition.

If it is getting an XMLException, it is probably not well-formed XML,
in which case it isn't XHTML. Writing a proper HTML parser is non-
trivial, especially if you want it to deal with all the poorly-former
XML out there. If the HTMLViewer class gave us access to the DOM
(which should be possible at least on Mac and Windows, probably
Linux), then you could use the platforms HTML parser and access the
HTML DOM tree. It is possible to do this yourself, but is clearly
more work. On the Mac, it will mean using Cocoa interfaces (see
Charles' book for doing that with declares).


--Brady
The La Jolla Underground

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: XHTML Parser
Date: 31.07.05 17:58 (Sun, 31 Jul 2005 18:58:42 +0200)
From: dda
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: XHTML Parser
Date: 31.07.05 20:27 (Sun, 31 Jul 2005 21:27:31 +0200)
From: Stefan Pantke

Am 31.07.2005 um 18:21 schrieb Thom McGrath:

> I need to parse XHTML. Thought that the built-in XML parser would
> do the trick, but it fails. Is there something out there?

Ensure that the source XML includes a proper doctype definition
and probably a correct encoding.

If not, add them beforehand.

Kinds
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>