aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/xml_extras/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/xml_extras/index.html')
-rw-r--r--files/zh-cn/xml_extras/index.html114
1 files changed, 0 insertions, 114 deletions
diff --git a/files/zh-cn/xml_extras/index.html b/files/zh-cn/xml_extras/index.html
deleted file mode 100644
index 6cf0a9db32..0000000000
--- a/files/zh-cn/xml_extras/index.html
+++ /dev/null
@@ -1,114 +0,0 @@
----
-title: XML Extras
-slug: XML_Extras
-tags:
- - XML
-translation_of: Mozilla/Tech/XML_Extras
----
-<p> </p>
-<p>The XML Extras module contains several features that allow developers to treat XML as data i.e. not as just another document format. The module is structured as a drop-in component and exposes its XML-as-data features both to <a href="cn/JavaScript">JavaScript</a> and C++/<a href="cn/XPCOM">XPCOM</a> users. The XML Extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly builds.</p>
-<h3 id="Feature_Status" name="Feature_Status">Feature Status</h3>
-<table class="standard-table">
- <tbody>
- <tr>
- <td class="header">Feature</td>
- <td class="header">Status</td>
- </tr>
- <tr>
- <td><a href="cn/XMLSerializer">XMLSerializer</a></td>
- <td>Available</td>
- </tr>
- <tr>
- <td><a href="cn/XMLHttpRequest">XMLHttpRequest</a></td>
- <td>Available</td>
- </tr>
- <tr>
- <td><a href="cn/DOMParser">DOMParser</a> (string and stream input source)</td>
- <td>Available</td>
- </tr>
- <tr>
- <td>Web Services with <a href="cn/SOAP_in_Gecko-based_Browsers">SOAP</a> and <a href="cn/Accessing_Web_Services_in_Mozilla_Using_WSDL_Proxying">WSDL</a></td>
- <td>Available since 1.4alpha. Moved to Web Services module during 1.4beta.</td>
- </tr>
- <tr>
- <td>XML Persistence</td>
- <td> </td>
- </tr>
- <tr>
- <td>FIXptr and XPointer</td>
- <td>Available since 1.4alpha in the core Mozilla. Moved to XMLExtras during 1.4beta.</td>
- </tr>
- </tbody>
-</table>
-<p>See also:</p>
-<ul>
- <li><a href="https://dxr.mozilla.org/mozilla-central/source/extensions/xml-rpc/" rel="custom">XML-RPC</a></li>
- <li><a href="cn/XML_in_Mozilla">XML in Mozilla</a></li>
- <li><a href="cn/XML_in_Mozilla#DOM_Load_and_Save_Methods">document.load()</a></li>
- <li><a class="external" href="http://kb.mozillazine.org/Category:XML_in_JavaScript">A few examples dealing with XML</a> from MozillaZine Knowledge Base.</li>
-</ul>
-<h3 id="QA_and_Testing" name="QA_and_Testing">QA and Testing</h3>
-<p>There are some <a class="external" href="http://www.mozilla.org/xmlextras/tests.html">online tests</a> for mainly exercising the HTTP GET method via <a href="cn/XMLHttpRequest">XMLHttpRequest</a>.</p>
-<p>Other test cases for each of the implemented components listed above exist in <code><a href="https://dxr.mozilla.org/mozilla-central/source/extensions/xmlextras/tests/" rel="custom">extensions/xmlextras/tests/</a></code>. More exhaustive test suites need to be created, however. If you'd like to help out with QA, you can do one of the following:</p>
-<ul>
- <li>Sign up as the QA owner for any of the implemented components. The QA owner will manage the tests associated with their component, act as QA contact for related bugs and help with regression testing.</li>
- <li>Contribute a test suite or individual tests that use the implemented components. File bugs for new test you have, and/or check them into <code><a href="https://dxr.mozilla.org/mozilla-central/source/extensions/xmlextras/tests/" rel="custom">extensions/xmlextras/tests/</a></code>.</li>
- <li>File bugs against the implemented components. Bugs should be filed against the XML component in the Browser product.</li>
-</ul>
-<h3 id="Documentation" name="Documentation">Documentation</h3>
-<p>Probably the best way to learn how to use these technologies is through examples. There are some in <code><a href="https://dxr.mozilla.org/mozilla-central/source/extensions/xmlextras/tests/" rel="custom">extensions/xmlextras/tests/</a></code>. If you follow that link to look at the examples you will need to look at page source for the HTML documents.</p>
-<p>For <a href="cn/XMLHttpRequest">XMLHttpRequest</a> object you can mostly rely on the <a class="external" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/63409298-0516-437d-b5af-68368157eae3.asp">Microsoft XMLHttpRequest documentation</a>, with some caveats: all functions and property names begin with a lower case letter and the object creation is different. Some properties are not implemented.</p>
-<p>Thad Hoffman has written a document that shows how you can mimic <a href="cn/Using_XML_Data_Islands_in_Mozilla">XML Data Islands in Mozilla</a>. Edmond Woychowsky has also written articles on XML Data Islands in Mozilla: "<a class="external" href="http://builder.com.com/article.jhtml?id=u00220030515woy01.htm">Make XML data islands work in Mozilla</a>", "<a class="external" href="http://builder.com.com/5100-6371-5085227.html">Build cross-browser XML paging code</a>" and "<a class="external" href="http://builder.com.com/article.jhtml?id=u00320030718woy01.htm">Implement a flexible shopping cart with XML and ASP</a>". The Mozilla Developer Center has several pages for <a href="cn/XMLHttpRequest">XMLHttpRequest</a>.</p>
-<p>Below are some key differencies in "XML Extras" between Mozilla and Microsoft software:</p>
-<table class="standard-table">
- <tbody>
- <tr>
- <td class="header">Difference</td>
- <td class="header">Microsoft</td>
- <td class="header">Mozilla</td>
- </tr>
- <tr>
- <td>Member names</td>
- <td>Case insensitive?</td>
- <td>Begins with lower case letter</td>
- </tr>
- <tr>
- <td><a href="cn/XMLHttpRequest">XMLHttpRequest</a> Creation</td>
- <td><code>new ActiveXObject("Msxml2.XMLHTTP")</code></td>
- <td><code>new XMLHttpRequest()</code></td>
- </tr>
- <tr>
- <td><code>XMLHttpRequest.send("some string")</code></td>
- <td>ok</td>
- <td>ok starting with milestone 0.9.7 (actually nightly 2001-11-28). With older builds, passing strings to send() works only in chrome, see <a href="https://dxr.mozilla.org/mozilla-central/source/extensions/xmlextras/tests/post.html" rel="custom">post.html</a> sample. The "workaround" is to use DOMParser object's <code>parseFromString()</code> method to create a document from string, and pass the temporary document into <code>send()</code>.</td>
- </tr>
- <tr>
- <td><code>XMLHttpRequest.open("aHost")</code></td>
- <td>ok</td>
- <td>&lt;tt&gt;<a class="external" rel="freelink">file://</a>&lt;/tt&gt; documents can access &lt;tt&gt;<a class="external" href="http://" rel="freelink">http://</a>&lt;/tt&gt; documents but you need to enable <code>UniversalBrowserRead</code> privilege in your scripts - see the <a class="external" href="http://www.mozilla.org/projects/security/components/signed-scripts.html#privs">JavaScript Security: Signed Scripts</a> document for more details. Normally your files should reside on a webserver so this shouldn't pose a problem (there you do not need that line either). Additionally, "foo.com:80" and "foo.com:313" are considered different hosts for security purposes. You cannot open a connection to a different host.</td>
- </tr>
- <tr>
- <td><a href="cn/DOMParser">DOMParser</a> Creation</td>
- <td>not available</td>
- <td><code>new DOMParser()</code></td>
- </tr>
- <tr>
- <td><a href="cn/XMLSerializer">XMLSerializer</a> Creation</td>
- <td>not available</td>
- <td><code>new XMLSerializer()</code></td>
- </tr>
- </tbody>
-</table>
-<p>Minimal documentation for the components listed above can be found using Mozilla documentation generated by <a class="external" href="http://www.doxygen.org/">Doxygen</a>. File new bugs for additional documentation contributions, either specifically aimed at JavaScript developers or to complete &amp; clarify the JavaDoc-style comments in the IDL files.</p>
-<ul>
- <li>nsIDOMSerializer (Currently, the JavaScript constructor is <code>XMLSerializer()</code>)</li>
- <li>nsIDOMParser (Currently, the JavaScript constructor is <code>DOMParser()</code>)</li>
- <li>nsIXMLHttpRequest</li>
-</ul>
-<p>Please see the <a href="cn/XML_in_Mozilla#XML_Linking_and_Pointing">XML Linking and Pointing</a> section in <a href="cn/XML_in_Mozilla">XML in Mozilla</a> document for FIXptr and XPointer documentation.</p>
-<h3 id="How_can_I_help.3F" name="How_can_I_help.3F">How can I help?</h3>
-<ul>
- <li>Help with <a href="cn/XML_in_Mozilla#Testing_and_QA">testing</a> the components contained within the module.</li>
- <li>Contribute <a href="#Documentation">Documentation</a> to the module.</li>
- <li>Help at the code level, contributing code patches for bug fixes or feature completion.</li>
-</ul>