Question

Please help me fix this XML. The error I get is: The entity "c" was referenced,...

Please help me fix this XML. The error I get is: The entity "c" was referenced, but not declared.

<?xml version = "1.0" encoding = "utf-8"?>

<!-- planes.xml - A document that lists ads for
used airplanes -->
<planes_for_sale>
<ad>
<year> 1977 </year>
<make> &c; </make>
<model> Skyhawk </model>
<color> Light blue and white </color>
<description> New paint, nearly new interior,
685 hours SMOH, full IFR King avionics </description>
<price> 23,495 </price>
<seller phone = "555-222-3333"> Skyway Aircraft </seller>
<location>
<city> Rapid City, </city>
<state> South Dakota </state>
</location>
</ad>
<ad>
<year> 1965 </year>
<make> &p; </make>
<model> Cherokee </model>
<color> Gold </color>
<description> 240 hours SMOH, dual NAVCOMs, DME,
new Cleveland brakes, great shape </description>
<seller phone = "555-333-2222"
email = "jseller@www.axl.com">
John Seller </seller>
<location>
<city> St. Joseph, </city>
<state> Missouri </state>
</location>
</ad>
</planes_for_sale>

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Here a new web page with name "planes.xml" is created, which contains following code.

Note : In xml any thing referenced using & is considered as entity.Hence need to remove & before c and p.

planes.xml :

<?xml version = "1.0" encoding = "utf-8"?>

<!-- planes.xml - A document that lists ads for

used airplanes -->

<planes_for_sale>

<ad>

<year> 1977 </year>

<make> c; </make>

<model> Skyhawk </model>

<color> Light blue and white </color>

<description> New paint, nearly new interior,

685 hours SMOH, full IFR King avionics </description>

<price> 23,495 </price>

<seller phone = "555-222-3333"> Skyway Aircraft </seller>

<location>

<city> Rapid City, </city>

<state> South Dakota </state>

</location>

</ad>

<ad>

<year> 1965 </year>

<make> p; </make>

<model> Cherokee </model>

<color> Gold </color>

<description> 240 hours SMOH, dual NAVCOMs, DME,

new Cleveland brakes, great shape </description>

<seller phone = "555-333-2222"

email = "jseller@www.axl.com">

John Seller </seller>

<location>

<city> St. Joseph, </city>

<state> Missouri </state>

</location>

</ad>

</planes_for_sale>

======================================================

Output : Open planes.xml in the browser and will get the screen as shown below

Screen 1 :planes.xml

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
Please help me fix this XML. The error I get is: The entity "c" was referenced,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT