Hii inaweza kuwa wazi kwa wengi, lakini wakati kusoma kwa ajili ya mtihani MOSS yangu programu, Nilijifunza kwamba ni pretty rahisi kupata XML halisi kutoka kutafuta swala kupitia interface user.
Njia moja ya haraka ni kama ifuatavyo:
- Kupata tafuta ya juu.
- Kufanya search kwamba anarudi baadhi ya data.
- Hariri ukurasa (kupitia tovuti ya mazingira).
- Change the XSL to the following:
<?xml toleo="1.0" encoding="UTF-8"?>
<xsl:Lahamtindo toleo="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:pato njia="xml" toleo="1.0" encoding="UTF-8" Indent="ndiyo"/>
<xsl:template mechi="/">
<pre>
<xsl:copy-of kuchagua="*"/>
</pre>
</xsl:template>
</xsl:Lahamtindo>
- Hit apply.
- View Source in the browser.
Note that the <pre> tag doesn’t do much except serve as a convenient marker when you view the results.
This trick can be very helpful when working with managed properties and customizing search. It will provide a definitive list of the XML available for you to use in your xslt which would have been very helpful the last 25 times I created some customized search results.
This ought to work for dataviews as well, though I have not tested that out as yet.