<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >SDO_DAS_XML::createDocument</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="SDO XML Data Access Service Functions" HREF="ref.sdo-das-xml.html"><LINK REL="PREVIOUS" TITLE="SDO_DAS_XML::createDataObject" HREF="function.sdo-das-xml-createdataobject.html"><LINK REL="NEXT" TITLE="SDO_DAS_XML::loadFile" HREF="function.sdo-das-xml-loadfile.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.sdo-das-xml-createdataobject.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.sdo-das-xml-loadfile.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.SDO-DAS-XML-createDocument" ></A >SDO_DAS_XML::createDocument</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN204551" ></A ><P > (no version information, might be only in CVS)</P >SDO_DAS_XML::createDocument -- Creates an XML Document object from scratch, without the need to load a document from a file or string. </DIV ><DIV CLASS="refsect1" ><A NAME="AEN204554" ></A ><H2 >说明</H2 >SDO_DAS_XML_Document <B CLASS="methodname" >SDO_DAS_XML::createDocument</B > ( [string document_element_name] )<BR ></BR >SDO_DAS_XML_Document <B CLASS="methodname" >SDO_DAS_XML::createDocument</B > ( string document_element_namespace_URI, string document_element_name )<BR ></BR ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >警告</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P >本函数是<SPAN CLASS="emphasis" ><I CLASS="emphasis" >实验性</I ></SPAN >的。本函数的行为,包括函数名称以及其它任何关于本函数的文档可能会在没有通知的情况下随 PHP 以后的发布而改变。使用本函数风险自担。</P ></TD ></TR ></TABLE ></DIV ><P > Creates an XML Document object. This will contain just one empty root element on which none of the properties will have been set. The purpose of this call is to allow an application to create an XML document from scratch without the need to load a document from a file or string. The document that is created will be as if a document had been loaded that contained just a single empty document element with no attributes set or elements within it. </P ><P > <B CLASS="function" >createDocument()</B > may need to be told what the document element is. This will not be necessary in simple cases. When there is no ambiguity then no parameter need be passed to the method. However it is possible to load more than one schema file into the same XML DAS and in this case there may be more than one possible document element defined: furthermore it is even possible that there are two possible document elements that differ only in the namespace. To cope with these cases it is possible to specify either the document element name, or both the document element name and namespace to the method. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN204577" ></A ><H2 >参数</H2 ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" >document_element_name</CODE ></DT ><DD ><P > The name of the document element. Only needed if there is more than one possibility. </P ></DD ><DT ><CODE CLASS="parameter" >document_element_namespace_URI</CODE ></DT ><DD ><P > The namespace part of the document element name. Only needed if there is more than one possible document element with the same name. </P ></DD ></DL ></DIV > </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN204591" ></A ><H2 >返回值</H2 ><P > Returns an SDO_XML_DAS_Document object on success. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN204594" ></A ><H2 >错误/异常</H2 ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" >SDO_UnsupportedOperationException</CODE ></DT ><DD ><P > Thrown if an element name or element name and namespace URI is passed, but not found in the underlying model. </P ></DD ></DL ></DIV > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.sdo-das-xml-createdataobject.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.sdo-das-xml-loadfile.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >SDO_DAS_XML::createDataObject</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.sdo-das-xml.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >SDO_DAS_XML::loadFile</TD ></TR ></TABLE ></DIV ></BODY ></HTML >