Link style with XML document : xml stylesheet « CSS Style « XML






Link style with XML document


File: Data.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="Style.css"?>
<article>
  <title>Styling XML documents with CSS</title>
  <section>
    <title>Introduction</title>
    <para>this is a test.</para>
    <para>topics:</para>
    <itemizedlist>
      <listitem>
        <para>A</para>
      </listitem>
      <listitem>
        <para>B</para>
      </listitem>
      <listitem>
        <para>C</para>
      </listitem>
      <listitem>
        <para>D</para>
      </listitem>
    </itemizedlist>
  </section>
</article>

File: Style.css

article {
  color:#000000;
  background-color:#FFFFFF;
  font-family:arial, verdana, sans-serif;
}

title {
  font-style:italic;
}
title, para {
  display:block
}
listitem {
  display:list-item; list-style: circle outside; margin-left: 2em
}

 








Related examples in the same category

1.Style for two tags