Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

you are going to implement error handling in several sections (pages). You need to make sure that the pages do not crash if an error is encountered, and that at the most, an acceptable error message i

you are going to implement error handling in several sections (pages). You need to make sure that the pages do not crash if an error is encountered, and that at the most, an acceptable error message is displayed, instead of the default error message one gets when the code crashes. You need to implement the error handling code to deal with any two of the following three scenarios:

  • Input XML file unavailable
  • Cookie variable does not exist or cannot be created (user disabled cookies)
  • Invalid values inside cookie variable

The page needs to store the items the user purchased into an XML file by either parsing the contents of the cookies created in the Shopping Cart page, or parsing the contents of the array stored in the cookie (depending on which strategy you chose to solve last week's assignment. The XML file, named purchases.xml needs to include the following items:

  • Item name
  • Item price

It is up to you to determine the format of the XML file, you are welcome to follow the below suggested format if you want:

<purchasedItems><Item><ItemName></ItemName><ItemPrice></ItemPrice></Item></purchasedItems>

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question