Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to ignore the <!DOCTYPE> part when parsing an XML file
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - 2 new - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Johann LEGAYE  
View profile  
 More options Jun 14 2012, 10:09 am
From: Johann LEGAYE <johann.leg...@4dconcept.fr>
Date: Thu, 14 Jun 2012 16:09:47 +0200
Local: Thurs, Jun 14 2012 10:09 am
Subject: How to ignore the <!DOCTYPE> part when parsing an XML file

Hello everyone,

I'm trying to parse XML files with this kind of code :

   parse-xml:parse("<from1>Jani</from1><from2>Jani</from2><from3>Jani</from3>" ,
      <opt:options>
        <opt:base-uri opt:value="urn:test"/>
        <opt:parse-external-parsed-entity/>
      </opt:options>

But when the XML file contains at the top a <!DOCTYPE> part, I get an
internal error :
dynamic error [err:FODC0006]: in valid content passed to
parse-xml:parse(): loader parsing error: internal error

How to ignore this <!DOCTYPE> part when parsing ?

Thanks for your help,

Johann
--

Johann LEGAYE
Ing�nieur D�veloppement 8 avenue Yves Brunaud - 31770 Colomiers T�l :
05.67.20.20.34 - Std : 05.67.20.20.30 - Fax : 05.67.20.20.30
www.4dconcept.fr <http://www.4dconcept.fr>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
William Candillon  
View profile  
 More options Jun 14 2012, 10:17 am
From: William Candillon <wcandil...@gmail.com>
Date: Thu, 14 Jun 2012 16:17:41 +0200
Local: Thurs, Jun 14 2012 10:17 am
Subject: Re: How to ignore the <!DOCTYPE> part when parsing an XML file

Hello Johann,

Thanks for raising this issue.
At the moment xml:parse() only accepts XML external entities as an input.
We're currently looking at a resolution for this bug.

Is there a workaround you can use in the meantime?

Kind regards,

William

On Thu, Jun 14, 2012 at 4:09 PM, Johann LEGAYE
<johann.leg...@4dconcept.fr>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Hillery  
View profile  
 More options Jun 14 2012, 8:10 pm
From: Chris Hillery <chill...@lambda.nu>
Date: Thu, 14 Jun 2012 17:10:22 -0700 (PDT)
Local: Thurs, Jun 14 2012 8:10 pm
Subject: Re: How to ignore the <!DOCTYPE> part when parsing an XML file
Nicolae gave a slightly longer answer to this question on the original
zorba-users mailing list, which I will copy here for reference:

----
While the error you receive is not very useful -- and we'll improve it
-- the reason you are getting it is that the option <opt:parse-
external-parsed-entity/> requries the input to be a well-formed
external parsed entity, and that does not allow for DOCTYPE
declarations.

But I agree that skipping such declarations would be useful and we
will add an option to do exactly that. In the mean time you can either
omit the <opt:parse-external-parsed-entity/> option or alternatively
remove the first line of the input, for example with the help of the
read-text() function from the File module (see the documentation here:
http://www.zorba-xquery.com/html/modules/expath/file#read-text-1 ).
----

Ceej
aka Chris Hillery


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »