From: | Mike Fowler <mike(at)mlfowler(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Mike Rylander <mrylander(at)gmail(dot)com>, Mike Berrow <mberrow(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | [PATCH] Re: Issue: Deprecation of the XML2 module 'xml_is_well_formed' function |
Date: | 2010-07-07 15:37:40 |
Message-ID: | 4C349F44.9020505@mlfowler.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut wrote:
> On lör, 2010-07-03 at 09:26 +0100, Mike Fowler wrote:
>
>> What I will do
>> instead is implement the xml_is_well_formed function and get a patch
>> out in the next day or two.
>>
>
> That sounds very useful.
>
Here's the patch to add the 'xml_is_well_formed' function. Paraphrasing
the SGML the syntax is:
|xml_is_well_formed|(/text/)
The function |xml_is_well_formed| evaluates whether the /text/ is well
formed XML content, returning a boolean. I've done some tests (included
in the patch) with tables containing a mixture of well formed documents
and content and the function is happily returning the expected result.
Combining with IS (NOT) DOCUMENT is working nicely for pulling out
content or documents from a table of text.
Unless I missed something in the original correspondence, I think this
patch will solve the issue.
Regards,
--
Mike Fowler
Registered Linux user: 379787
Attachment | Content-Type | Size |
---|---|---|
xml_is_well_formed-1.patch | text/x-diff | 8.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Urbański | 2010-07-07 15:41:04 | Re: Python Interface Hacking |
Previous Message | Tim Landscheidt | 2010-07-07 15:25:34 | Re: cvs to git migration - keywords |