Question

In: Computer Science

Explain how business websites can benefit from the different objects PHP offer that deal with XML....

  • Explain how business websites can benefit from the different objects PHP offer that deal with XML. Using appropriate research and readings, explain how you, as a developer, can use the objects or components, to improve a business website.
  • In many situations, websites store user data in XML format. Write a function or procedure that reads user input (say name, e-mail address, and comment) from the screen or form and stores them in a file in XML format. Define the XML file and explain why you selected this format. How can the website use your code to provide dynamic feedback to the user?

Solutions

Expert Solution

declare function prefix:function_name($parameter as datatype?...)
as returnDatatype?
{
the body of the function comes here..
}

-->The expression can be showed as:
declare function local:discount($price as xs:decimal?,$percentDiscount as xs:decimal?)
as xs:decimal? {
let $discount := $price - ($price * $percentDiscount div 100)
return $discount
};

let $originalPrice := 100

let $discountAvailed := 10

return ( local:discount($originalPrice, $discountAvailed))

--> Output for the above is => 90


Related Solutions

Discuss how multinational companies can deal with repatriation issue. How can companies benefit from using women...
Discuss how multinational companies can deal with repatriation issue. How can companies benefit from using women expatriate? Is there advantage in male versus female?
Explain how a business in Oman can benefit from ‘profit’. The answer should include: i. A...
Explain how a business in Oman can benefit from ‘profit’. The answer should include: i. A brief description of ‘profit’ as an encumbrance. ii. A detailed example showing at least one (1) benefit. iii. A brief description of any problem that may occur in this arrangement. Q9. Explain your agreement or disagreement with the following statement: “Cyclical decoration should be restricted to rich areas only”. The answer should include a brief description of: i. Cyclical decoration. ii. The relevance of...
How can two different benefit functions reflect exactly the same preferences? Explain.
How can two different benefit functions reflect exactly the same preferences? Explain.
Explain how the practice of biodiversity conservation can benefit from an understanding of (i) the genetics...
Explain how the practice of biodiversity conservation can benefit from an understanding of (i) the genetics of individuals within populations, (ii) the mechanisms of speciation, and (iii) the major climatic changes of the past 65 million years. For each of (i), (ii) and (iii), give examples to explain how and why knowledge in each area is important to conservation
How can a business be both a wholesaler and a retailer? Please offer an example in...
How can a business be both a wholesaler and a retailer? Please offer an example in 350 words or less.
Discuss how firms can benefit from (1) related diversification and also can benefit from (2) unrelated...
Discuss how firms can benefit from (1) related diversification and also can benefit from (2) unrelated diversification. Discuss some of the key concepts that can explain firm success or firm failure from selecting one or the other diversification strategy.
How is the cheapest plan different from the standing offer? Why do energy providers offer so...
How is the cheapest plan different from the standing offer? Why do energy providers offer so many plans in addition to the standing offer? If the government wants to make electricity more affordable, why can be done in terms of pricing?
Describe a non-manufacturing business that could benefit from the use of standards. Additionally, explain how standards...
Describe a non-manufacturing business that could benefit from the use of standards. Additionally, explain how standards would help that business control its operations.
what can the low offer or benefit the company? can you please write as much as...
what can the low offer or benefit the company? can you please write as much as you can thank you
How can the true color of objects be affected by artificial lighting? Explain briefly
How can the true color of objects be affected by artificial lighting? Explain briefly
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT