2 Replies - 431 Views - Last Post: 16 September 2012 - 11:32 AM

#1 AOM_Set  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 151
  • Joined: 18-December 10

How to view xml with the corresponding .dtd file

Posted 16 September 2012 - 09:32 AM

Hi. I have created a point.dtd file, and a corresponding XML file. When opening the xml file called point.xml, it opens as an xml tree with correspoinding children, instead of text. How can one make it open so that it is readable to people that don't understand xml? The code is:
The point.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE point SYSTEM "point.dtd">
<point>
	<address>Hvej 1</address>
	<latitude>100</latitude>
	<longitude>50</longitude>
	<note>None</note>
</point>


And the point.dtd file
<!ELEMENT point ((address|latitude)?, longitude?, note*)>

<!ELEMENT latitude (#PCDATA)>
<!ELEMENT longitude (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT note (#PCDATA)>



Thanks in advance
Ps. They are placed in the same folder, so the url should be good

Is This A Good Question/Topic? 0
  • +

Replies To: How to view xml with the corresponding .dtd file

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3530
  • View blog
  • Posts: 10,179
  • Joined: 08-June 10

Re: How to view xml with the corresponding .dtd file

Posted 16 September 2012 - 10:17 AM

in that case you need a programme that processes the XML and outputs something human-readable (e.g. HTML). but XML itself is just a data exchange format. it was never meant to be human-readable.
Was This Post Helpful? 1
  • +
  • -

#3 AOM_Set  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 151
  • Joined: 18-December 10

Re: How to view xml with the corresponding .dtd file

Posted 16 September 2012 - 11:32 AM

I found out that if I add a stylesheet, then it works too
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1