I am just in the first week of XML class. Never even heard of it before this class. I am getting this error message, and here is my output. I have tried in IE and Chrome. Same result. Can someone tell me what I am doing wrong?

Thank you!!!

Teddi


Jackson Electronic Products Frequently Asked Questions The ScanMaster How do I scan slides? You can scan slides using the JE Transparency Adapter (part number STA8901) available from Jackson Electronics. Where can I find the latest drivers for my ScanMaster? You can download the latest software drivers from the Jackson Electronics Web page. What is the largest sheet that I can scan? 8.5 x 14 inches (216 x 356 mm). How do I fax with my ScanMaster? You can turn your scanner into a fax machine by purchasing the FaxRight add-on component (part number STA4500) available from Jackson Electronics. DigiCam What is the difference between optical and digital zoom? With optical zoom, the Digicam's lens physically moves inside the camera; with digital zoom, the camera's processor zooms the image electronically. If you zoom too much, your image will become pixelated. What sort of batteries should I use with the DigiCam? Nickel metal hydride (NiMH) batteries work the best and have the longest lifetime. Nickel-cadium batteries also work very well, as do alkaline batteries. Do not use lithium batteries. What resolution should I use for 4x6-inch photos? We recommend 640x480 for 4x6-inch images, 1024x768 for 5x7-inch photos, and 1600x1200 for 8x10-inch photos. Can the DigiCam be harmed by airport X-ray machines? No, there is no evidence that X-ray machines can affect the performance of the DigiCam or the quality of DigiCam photos. The XML page cannot be displayed
Cannot view XML input using CSS style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

The following tags were not closed: FAQ, products. Error processing resource 'file:///C:/Users/Teddi's Dell/Documents/CIS60...


Here is my source code and css sheet:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- ScanMaster and DigiCamFAQ -->
<!-- Teddi Moon -->
<!-- December 6, 2010 -->

<?xml-stylesheet type="text/css" href="jw.scc" ?>

<FAQ>
   <title>Jackson Electronic Products</title>
   <subtitle>Frequently Asked Questions</subtitle>

<products>
   <product/>
      <model>The ScanMaster</model>
         <question>How do I scan slides?</question>
         <answer>
            <![CDATA[
                     You can scan slides using the JE Transparency Adapter (part number STA8901) available from
                     Jackson Electronics.
            ]]>
         </answer>

         <question>Where can I find the latest drivers for my ScanMaster?</question>
         <answer>
            <![CDATA[
                     You can download the latest software drivers from the Jackson Electronics Web page.
            ]]>
         </answer>
      
         <question>What is the largest sheet that I can scan?</question>
         <answer>
            <![CDATA[
                     8.5 x 14 inches (216 x 356 mm).
         ]]>
         </answer>
  
         <question>How do I fax with my ScanMaster?</question>
         <answer>
            <![CDATA[
                     You can turn your scanner into a fax machine by purchasing the FaxRight add-on component
                     (part number STA4500) available from Jackson Electronics.
            ]]>
         </answer>

   <product/>  
      <model>DigiCam</model>
         <question>What is the difference between optical and digital zoom?</question>
         <answer>
            <![CDATA[
                  With optical zoom, the Digicam's lens physically moves inside the camera; with digital zoom, the
                  camera's processor zooms the image electronically. If you zoom too much, your image will become
                  pixelated.
            ]]>
         </answer>
 
         <question>What sort of batteries should I use with the DigiCam?</question>
         <answer>
            <![CDATA[
                     Nickel metal hydride (NiMH) batteries work the best and have the longest lifetime. Nickel-cadium
                     batteries also work very well, as do alkaline batteries. Do not use lithium batteries.
            ]]>
      </answer>

      <question>What resolution should I use for 4x6-inch photos?</question>
      <answer>
         <![CDATA[
                  We recommend 640x480 for 4x6-inch images, 1024x768 for 5x7-inch photos, and 1600x1200 for 8x10-inch
                  photos.
            ]]>
         </answer>
 
         <question>Can the DigiCam be harmed by airport X-ray machines?</question>
         <answer>
            <![CDATA[
                     No, there is no evidence that X-ray machines can affect the performance of the DigiCam or the quality of
                     DigiCam photos.
            ]]>
         </answer>
<products/>

////The requirements were to use [CDATA[ for the answers. I am not sure I would have chosen that. but oh well.

Here is the css:

/*
   New Perspectives on XML
   Tutorial 1
   Case Problem 1
   Filename: faq.css

   This file contains styles used in the faq.xml file.

*/

FAQ      {margin-top: 10px}
title    {display: block; width: 500px; font-family: Arial, Helvetica, Sans-serif; 
          font-size: 18pt;
          margin-left: 20px}

subtitle {display: block; width: 500px; font-family: Arial, Helvetica, Sans-serf; 
          font-size:14pt; font-style:italic;
          margin-left: 20px}

product  {display: block; width: 500px; background-color: ivory;
          border: solid 2px black; margin-bottom: 20px; padding: 10px;
          margin-left: 10px}

model    {display: block; width: 500px; font-family: Arial, Helvertica, Sans-serif; 
          font-size: 14pt; color:blue;
          margin-left: 10px; margin-top: 5px}

question {display: list-item; list-style-type: disc; width: 500px;
          margin-left: 30px; margin-top: 10px}

answer   {display:block; width: 450px; font-family: Times New Roman, Times, Serif;
          color: green;
          margin-left: 35px}

With all the respect, Why the hell would you use CSS for xml,when so much functionality gets lost? i looked at your xml and this can easily be done with xsl-fo.

does it have to be in css? or it just the end product that matters? i could give you an xsl-fo example if you like.

Henk.

Dear Teddi,

your code contains couple of problems
1. input xml is not well formed. (no root element present in this document., etc)
2. calling css is wrong. hence i have coded the sample.xml and sample.css for u.

your way of learning is correct. start with css and end with xsl-fo as, mentioned above user., All the best.

code 1 sample.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- ScanMaster and DigiCamFAQ -->
<!-- Teddi Moon -->
<!-- December 6, 2010 -->

<?xml-stylesheet type="text/css" href="sample.css" ?>
<root>
<FAQ>
   <title>Jackson Electronic Products</title>
   <subtitle>Frequently Asked Questions</subtitle>
</FAQ>
<products>
   <product/>
      <model>The ScanMaster</model>
         <question>How do I scan slides?</question>
         <answer>
            <![CDATA[
                     You can scan slides using the JE Transparency Adapter (part number STA8901) available from
                     Jackson Electronics.
            ]]>
         </answer>

         <question>Where can I find the latest drivers for my ScanMaster?</question>
         <answer>
            <![CDATA[
                     You can download the latest software drivers from the Jackson Electronics Web page.
            ]]>
         </answer>
      
         <question>What is the largest sheet that I can scan?</question>
         <answer>
            <![CDATA[
                     8.5 x 14 inches (216 x 356 mm).
         ]]>
         </answer>
  
         <question>How do I fax with my ScanMaster?</question>
         <answer>
            <![CDATA[
                     You can turn your scanner into a fax machine by purchasing the FaxRight add-on component
                     (part number STA4500) available from Jackson Electronics.
            ]]>
         </answer>

   <product/>  
      <model>DigiCam</model>
         <question>What is the difference between optical and digital zoom?</question>
         <answer>
            <![CDATA[
                  With optical zoom, the Digicam's lens physically moves inside the camera; with digital zoom, the
                  camera's processor zooms the image electronically. If you zoom too much, your image will become
                  pixelated.
            ]]>
         </answer>
 
         <question>What sort of batteries should I use with the DigiCam?</question>
         <answer>
            <![CDATA[
                     Nickel metal hydride (NiMH) batteries work the best and have the longest lifetime. Nickel-cadium
                     batteries also work very well, as do alkaline batteries. Do not use lithium batteries.
            ]]>
      </answer>

      <question>What resolution should I use for 4x6-inch photos?</question>
      <answer>
         <![CDATA[
                  We recommend 640x480 for 4x6-inch images, 1024x768 for 5x7-inch photos, and 1600x1200 for 8x10-inch
                  photos.
            ]]>
         </answer>
 
         <question>Can the DigiCam be harmed by airport X-ray machines?</question>
         <answer>
            <![CDATA[
                     No, there is no evidence that X-ray machines can affect the performance of the DigiCam or the quality of
                     DigiCam photos.
            ]]>
         </answer>
<products/>

</products>
</root>

code 2 sample.css

/*
   New Perspectives on XML
   Tutorial 1
   Case Problem 1
   Filename: faq.css

   This file contains styles used in the faq.xml file.

*/

FAQ      {margin-top: 10px}
title    {display: block; width: 500px; font-family: Arial, Helvetica, Sans-serif; 
          font-size: 18pt;
          margin-left: 20px}

subtitle {display: block; width: 500px; font-family: Arial, Helvetica, Sans-serf; 
          font-size:14pt; font-style:italic;
          margin-left: 20px}

product  {display: block; width: 500px; background-color: ivory;
          border: solid 2px black; margin-bottom: 20px; padding: 10px;
          margin-left: 10px}

model    {display: block; width: 500px; font-family: Arial, Helvertica, Sans-serif; 
          font-size: 14pt; color:blue;
          margin-left: 10px; margin-top: 5px}

question {display: list-item; list-style-type: disc; width: 500px;
          margin-left: 30px; margin-top: 10px}

answer   {display:block; width: 450px; font-family: Times New Roman, Times, Serif;
          color: green;
          margin-left: 35px}

Thanks and regards,
yuvanbala

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- ScanMaster and DigiCamFAQ -->
<!-- Teddi Moon -->
<!-- December 6, 2010 -->

<?xml-stylesheet type="text/css" href="jw.css" ?>

<FAQ>
   <title>Jackson Electronic Products</title>
   <subtitle>Frequently Asked Questions</subtitle>

<products>
   <product/>
      <model>The ScanMaster</model>
         <question>How do I scan slides?</question>
         <answer>
            <![CDATA[
                     You can scan slides using the JE Transparency Adapter (part number STA8901) available from
                     Jackson Electronics.
            ]]>
         </answer>

         <question>Where can I find the latest drivers for my ScanMaster?</question>
         <answer>
            <![CDATA[
                     You can download the latest software drivers from the Jackson Electronics Web page.
            ]]>
         </answer>
      
         <question>What is the largest sheet that I can scan?</question>
         <answer>
            <![CDATA[
                     8.5 x 14 inches (216 x 356 mm).
         ]]>
         </answer>
  
         <question>How do I fax with my ScanMaster?</question>
         <answer>
            <![CDATA[
                     You can turn your scanner into a fax machine by purchasing the FaxRight add-on component
                     (part number STA4500) available from Jackson Electronics.
            ]]>
         </answer>

   <product/>  
      <model>DigiCam</model>
         <question>What is the difference between optical and digital zoom?</question>
         <answer>
            <![CDATA[
                  With optical zoom, the Digicam's lens physically moves inside the camera; with digital zoom, the
                  camera's processor zooms the image electronically. If you zoom too much, your image will become
                  pixelated.
            ]]>
         </answer>
 
         <question>What sort of batteries should I use with the DigiCam?</question>
         <answer>
            <![CDATA[
                     Nickel metal hydride (NiMH) batteries work the best and have the longest lifetime. Nickel-cadium
                     batteries also work very well, as do alkaline batteries. Do not use lithium batteries.
            ]]>
      </answer>

      <question>What resolution should I use for 4x6-inch photos?</question>
      <answer>
         <![CDATA[
                  We recommend 640x480 for 4x6-inch images, 1024x768 for 5x7-inch photos, and 1600x1200 for 8x10-inch
                  photos.
            ]]>
         </answer>
 
         <question>Can the DigiCam be harmed by airport X-ray machines?</question>
         <answer>
            <![CDATA[
                     No, there is no evidence that X-ray machines can affect the performance of the DigiCam or the quality of
                     DigiCam photos.
            ]]>
         </answer>

</products>
</FAQ>

hi, Whats wrong!! it works.

you are right
i not saw the answers from you

Henk,

I agree with you from the research I did in trying to figure this out. Assignment specifically says to "apply the faq.css style sheet to this document."

With all the respect, Why the hell would you use CSS for xml,when so much functionality gets lost? i looked at your xml and this can easily be done with xsl-fo.

does it have to be in css? or it just the end product that matters? i could give you an xsl-fo example if you like.

Henk.

OK, I must really be an idiot with this. When I try to run this on my computer, it opens as one paragraph. When I copy and pasted my code into our Blackboard forum, and submitted it, it shows up that way it should. So apparently, I am not getting it right when I try to look at it on my computer. So just how am I to open it, run it, whatever, on my computer? I have visual basic 2008, I wrote this in note pad, I just downloaded msxml. I know I am missing something so basic, I don't even know it.

Here is what my code looks like now:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- ScanMaster and DigiCamFAQ -->
<!-- Teddi Moon -->
<!-- December 6, 2010 -->

<?xml-stylesheet type="text/css" href="faq.scc" ?>


<faq>
  <title>Jackson Electronic Products</title>
  <subtitle>Frequently Asked Questions</subtitle>

  <products/>
  <product/>
  <model>The ScanMaster</model>
  <question>How do I scan slides?</question>
  <answer>
    <![CDATA[
                     You can scan slides using the JE Transparency Adapter (part number STA8901) available from
                     Jackson Electronics.
            ]]>
  </answer>

  <question>Where can I find the latest drivers for my ScanMaster?</question>
  <answer>
    <![CDATA[
                     You can download the latest software drivers from the Jackson Electronics Web page.
            ]]>
  </answer>

  <question>What is the largest sheet that I can scan?</question>
  <answer>
    <![CDATA[
                     8.5 x 14 inches (216 x 356 mm).
         ]]>
  </answer>

  <question>How do I fax with my ScanMaster?</question>
  <answer>
    <![CDATA[
                     You can turn your scanner into a fax machine by purchasing the FaxRight add-on component
                     (part number STA4500) available from Jackson Electronics.
            ]]>
  </answer>
 

  <product>
    <model>DigiCam</model>
    <question>What is the difference between optical and digital zoom?</question>
    <answer>
      <![CDATA[
                  With optical zoom, the Digicam's lens physically moves inside the camera; with digital zoom, the
                  camera's processor zooms the image electronically. If you zoom too much, your image will become
                  pixelated.
            ]]>
    </answer>

    <question>What sort of batteries should I use with the DigiCam?</question>
    <answer>
      <![CDATA[
                     Nickel metal hydride (NiMH) batteries work the best and have the longest lifetime. Nickel-cadium
                     batteries also work very well, as do alkaline batteries. Do not use lithium batteries.
            ]]>
    </answer>

    <question>What resolution should I use for 4x6-inch photos?</question>
    <answer>
      <![CDATA[
                  We recommend 640x480 for 4x6-inch images, 1024x768 for 5x7-inch photos, and 1600x1200 for 8x10-inch
                  photos.
            ]]>
    </answer>

    <question>Can the DigiCam be harmed by airport X-ray machines?</question>
    <answer>
      <![CDATA[
                     No, there is no evidence that X-ray machines can affect the performance of the DigiCam or the quality of
                     DigiCam photos.
            ]]>
    </answer>

  </product>
 
  
</faq>

Electronic productions Frequently Asked questioning The ScanMaster How do I scattered slides? You can scan slides using the JE Transparency Adapter (part number STA8901) available from Jackson physics Where can I find the most previous drivers for my scarcely? You can download the latest software drivers from the Jackson Electronics network page What is the largest sheet that I can scan?

Try along the lines of, but not exactly(just an example),

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="css.css"?>
<notes>
    <note>
        <to>Tove</to>
    </note>
    <note2>
        <to>Jove</to>
    </note2>
    <note>
        <to>Gove</to>
    </note>
</notes>

And a CSS file as

note {
    background-color:red;
}
note2 {
    background-color: yellow;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.