简体   繁体   中英

XML stylesheet - Web Service

I use a web service from my company to display some informations about employees (like Adress Book in Outlook). So i create a little HTML form that POST the web service. I receive the data i want but in an XML tree with a classical "This XML file does not appear to have any style information associated with it. The document tree is shown below."

I know it's not a real error but i want to display correctly these data for my users. (of course i can't add an xls directly in the web service because i don't have access to it)

Here what kind of xml i receive if it can help :

<ArrayOfAccount xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://wdi-ws.disney.com/02/2009"> <Account> <AccountName>ACREPIN</AccountName> <Email>ALEXANDRE.CREPIN@disney.com</Email> <FirstName>ALEXANDRE</FirstName> <LastName>CREPIN</LastName> <FullName>CREPIN, ALEXANDRE</FullName> <DistinguishedName> CN=CREPIN\\, ALEXANDRE,OU=Users,OU=Backstage,OU=FRMV,OU=FR,DC=emea,DC=wdpr,DC=disney,DC=com </DistinguishedName> <Domain>emea</Domain> <City/> <Address/> <Company>DLP</Company> <Department>400300</Department> <EmployeeID>S187292</EmployeeID> <Telephone>47582</Telephone> <Groups/> <Title>187292</Title> <IsValid>true</IsValid> </Account> </ArrayOfAccount>

Thank you in advance and have a good day!

Make sure you start the xml document with

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

But any browser will just show the XML as raw data if no stylesheet is present and show that "error", meaning that it's just raw xml and not an actual page meant to be viewed in a browser.

An example of a styled xml file: https://www.w3.org/Style/Examples/001/doc.xml More information: https://www.w3.org/Style/styling-XML

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM