NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Wrong error when parsing an XML doctype


Joined: 27 Mar 2023
Posts: 50
Reply with quote
The IDE erroneously reports an error "unexpected "identifier"" on version=

Code:
   ?><?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<?php


It seems not to understand that this is an XML code generated by php.

This is present in the latest 20034 build.
View user's profileFind all posts by ShoresOfNowhereSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
No, it does not understand XML code generated by php. If the file has php extensions, any text outside of php tags is treated as HTML, not XML.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Mar 2023
Posts: 50
Reply with quote
Any way this could be set with an option or configuration setting?

If it is changed to an .xml extension the php parts will be correctly parsed?
View user's profileFind all posts by ShoresOfNowhereSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
no, they won't be.
Even though you can pass any text file though php interpreter, it does not mean it's good to do so. You'd better use templates to generate dynamic content with PHP interpreter.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Wrong error when parsing an XML doctype
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic