issue with xml functionality and

From Belbin, Peter
Subject issue with xml functionality and
Date
Msg-id 03FD38C1397A8C45AFC383CB4F1704FE290BFAFC43@MAILCLUSTER2.mcld.net
Whole thread Raw
Responses Re: issue with xml functionality and  (Bruce Momjian <bruce@momjian.us>)
List pgsql-general
I'm hoping this is the right place to ask.

If not, please, kindly direct me to the right place.

I'm having an issue with xml functionality.

The issue is that the xml value has the following (large chunks have been removed, but this should be enough to
demonstratethe issue): 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.8//EN"
"http://www.opensymphony.com/osworkflow/workflow_2_8.dtd">
<workflow>
  <meta name="lastModified">Thu Feb 21 13:20:46 CST 2008</meta>
  <meta name="generator">OSWorkflow Designer</meta>
</workflow>

When I try to get a list of the meta tag names with

set XML OPTION DOCUMENT;
select xpath('/workflow/meta/@name', workflow::xml) as thing1 from workflows where id = 3


I get the following message:


ERROR:  could not parse XML data
DETAIL:  Entity: line 2: parser error : StartTag: invalid element name
<!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.8//EN" "http:
 ^

********** Error **********

ERROR: could not parse XML data
SQL state: 2200M
Detail: Entity: line 2: parser error : StartTag: invalid element name
<!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.8//EN" "http:
 ^


The content of the text column is a valid xml document.  The fragment starting with <!DOCTYPE is entirely valid.  It
shouldn'tbe making a fuss about this. 

By the way, if I comment out (ie: wrap that 2nd line with <!-- -->), it seems to work just fine.

Please advise.

Regards,
Peter Belbin.





NOTICE: This electronic mail transmission may contain confidential information and is intended only for the person(s)
named. Any use, copying, or disclosure by any other person is strictly prohibited. If you have received this
transmissionin error, please notify the sender via e-mail. 

pgsql-general by date:

Previous
From: PJ
Date:
Subject: Re: migration problem
Next
From: Zdenek Kotala
Date:
Subject: Re: Collate problem when using ORDER BY