Here demos a simple XML document, Showing some basic structure within an xml. This will Hopefully act as a reference and also a good start point.
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<!-- processing instruction, specifically as the xml decleration -->
<!-- declaration -->
<!DOCTYPE telegram
SYSTEM "/xmlresources/dtds/telegram.dtd"
[
<!ENTITY entity "<graphic file='ext.jpg' >" >
<!ENTITY entity-2 "<graphic file='kaka.jpg' >" >
<!ENTITY outerent SYSTEM "ref.xml">
<!ENTITY outerimg SYSTEM "moon.gif" NDATA GIF>
]
>
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 3.2//EN"
"http://www.w3.org/TR/HTML/html.dtd"
>
<!-- processing instruction -->
<?target data?>
<?flubber pg=9 recto?>
<?thingie?>
<?xyz stop: the presses?>
<?xml-stylesheet type="text/css" href="style.css" ?>
<?xml-stylesheet type="text/xml" href="style.xsl" ?>
<!-- above is prolog of this xml document -->

<telegram xmlns:doc="http://www.doc.blah"
xmlns="http://www.default.ns">
<empty-element attribute1="value1" attribute2="" />
<container-element>
Group together elements and character data.
</container-element>
<!-- Create a section of character data that should not be parsed,
preserving any special characters inside it.
-->
<![CDATA[dvfaregstb##@%$#@%$y^&^&,<>]]>
<!-- Command the parser to insert some text stored elsewhere. -->
&entity;
&entity-2;
&outerent;
&outerimg;
<>&"'
{
ç�𐀀
Þ
<doc:ele attr="value" />
<poem xml:space="preserve">
i love beijing tianmen square,
the sun always rise
there.
</poem>
</telegram>

--END
1592

被折叠的 条评论
为什么被折叠?



