2005-07-19 11:16:59 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-07-25 14:15:45 +00:00
|
|
|
<!-- $Revision: 1.8 $ -->
|
2005-07-19 11:16:59 +00:00
|
|
|
<!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. -->
|
|
|
|
<reference id="ref.sdo-das-xml">
|
2005-07-20 10:59:47 +00:00
|
|
|
<title>SDO XML Data Access Service Functions</title>
|
2005-07-25 14:15:45 +00:00
|
|
|
<titleabbrev>SDO DAS XML</titleabbrev>
|
2005-07-19 11:16:59 +00:00
|
|
|
|
2005-07-20 10:59:47 +00:00
|
|
|
<partintro>
|
|
|
|
<section id="sdo-das-xml.intro">
|
2005-07-19 11:16:59 +00:00
|
|
|
&reftitle.intro;
|
2005-07-20 10:59:47 +00:00
|
|
|
<para>
|
|
|
|
<!-- This warns that the extension is experimental -->
|
|
|
|
&warn.experimental;
|
|
|
|
</para>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
In order to use the XML Data Access Service for Service Data Objects,
|
|
|
|
you will need to understand some of the concepts behind SDO:
|
|
|
|
the data graph, the data object, XPath and property expressions,
|
|
|
|
and so on.
|
2005-07-20 10:59:47 +00:00
|
|
|
If you are not familiar with these ideas, you might want to look first at
|
2005-07-24 20:50:13 +00:00
|
|
|
<link linkend='ref.sdo'>the section on SDO</link>
|
|
|
|
.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
The job of the XML DAS is to move data between the
|
|
|
|
application and an XML data source.
|
|
|
|
In order to do this it needs to be told the
|
|
|
|
XML schema the XML should follow.
|
|
|
|
This model information is used to ensure conformance
|
|
|
|
of XML being written out, and also to ensure that
|
|
|
|
modifications made to an SDO originating from XML
|
|
|
|
follow the model described by the XML schema.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
The XML DAS currently supports reading/writing XML
|
|
|
|
to/from a file or an http URL (for example, to support RSS feeds).
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</section>
|
2005-07-19 11:16:59 +00:00
|
|
|
|
2005-07-20 10:59:47 +00:00
|
|
|
<section id="sdo-das-xml.requirements">
|
|
|
|
&reftitle.required;
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
The SDO XML Data Access Service requires PHP 5.1 or higher.
|
|
|
|
It is packaged with the SDO extension and requires
|
|
|
|
SDO to have been installed.
|
2005-07-20 10:59:47 +00:00
|
|
|
See the
|
|
|
|
<link linkend="sdo.installation">SDO installation instructions</link>
|
|
|
|
for steps on how to do this.
|
2005-07-21 10:14:43 +00:00
|
|
|
</para>
|
2005-07-20 10:59:47 +00:00
|
|
|
</section>
|
2005-07-19 11:16:59 +00:00
|
|
|
|
2005-07-20 10:59:47 +00:00
|
|
|
<section id="sdo-das-xml.installation">
|
|
|
|
&reftitle.install;
|
|
|
|
<para>
|
|
|
|
The XML Data Access Service is packaged and installed as part of the
|
2005-07-25 14:15:45 +00:00
|
|
|
<link linkend='ref.sdo'>SDO extension.</link> Please Refer
|
|
|
|
<link linkend="sdo.installation">SDO installation instructions.</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</section>
|
2005-07-19 11:16:59 +00:00
|
|
|
|
2005-07-21 10:14:43 +00:00
|
|
|
|
2005-07-20 10:59:47 +00:00
|
|
|
<section id='sdo-das-xml.limitations'>
|
|
|
|
<title>Limitations</title>
|
|
|
|
<para>
|
|
|
|
The
|
|
|
|
<ulink url='&url.ibm.sdo;'>SDO 2.0 specification</ulink>
|
2005-07-21 10:14:43 +00:00
|
|
|
defines the mapping between XML types and SDO types.
|
|
|
|
With Java SDO, this mapping is implemented by the XMLHelper.
|
|
|
|
With SDO for PHP, this mapping is implemented by the
|
|
|
|
XML Data Access Services.
|
|
|
|
The XML DAS implements the mapping described in the
|
|
|
|
SDO 2.0 specification with the following restrictions:
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<procedure id='sdo-das-xml.limitations.simpletypes'>
|
|
|
|
<title>XML Simple Types</title>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Simple Type with abstract="true"
|
|
|
|
- no PHP support for SDO abstract types.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Simple Type with sdoJava:instanceClass
|
|
|
|
- no PHP equivalent provided.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Simple Type with sdoJava:extendedInstanceClass
|
|
|
|
- no PHP equivalent provided.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
|
|
|
Simple Type with list of itemType.
|
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
|
|
|
Simple Type with union.
|
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
</procedure>
|
|
|
|
|
|
|
|
<procedure id='sdo-das-xml.limitations.complextypes'>
|
|
|
|
<title>XML Complex Types</title>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Complex Type with abstract="true"
|
|
|
|
- no PHP support for SDO abstract types.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Complex Type with sdo:aliasName
|
|
|
|
- no PHP support for SDO Type aliases.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Complex Type with open content
|
|
|
|
- no PHP support for SDO open types.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Complex Type with open attribute
|
|
|
|
- no PHP support for SDO open types.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
</procedure>
|
|
|
|
|
|
|
|
<procedure id='sdo-das-xml.limitations.attribute'>
|
|
|
|
<title>XSD Attribute</title>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Attribute with sdo:aliasName
|
|
|
|
- no PHP support for SDO property aliases.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Attribute with default value
|
|
|
|
- no PHP support for SDO property defaults.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Attribute with fixed value
|
|
|
|
- no PHP support for SDO read-only properties or default values.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
|
|
|
Attribute reference.
|
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Attribute with sdo:string
|
|
|
|
- no support for sdo:string="true".
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Attribute referencing a DataObject with
|
|
|
|
sdo:propertyType - no support for sdo:propertyType="...".
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Attribute with bi-directional property to a DataObject with
|
|
|
|
sdo:oppositeProperty and sdo:propertyType
|
|
|
|
- no PHP support for SDO opposite.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
</procedure>
|
|
|
|
|
|
|
|
<procedure id='sdo-das-xml.limitations.elements'>
|
|
|
|
<title>XSD Elements</title>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Element with sdo:aliasName
|
|
|
|
- no PHP support for SDO property aliases.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
|
|
|
Element reference.
|
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
|
|
|
Element with nillable.
|
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
|
|
|
Element with substitution group.
|
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
</procedure>
|
|
|
|
|
|
|
|
<procedure id='sdo-das-xml.limitations.elementsimpletype'>
|
|
|
|
<title>XSD Elements with Simple Type</title>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Element of SimpleType with default
|
|
|
|
- no PHP support for SDO defaults
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Element of SimpleType with fixed value
|
|
|
|
- no PHP support for SDO read-only properties or default values.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Element of SimpleType with sdo:string
|
|
|
|
- no support for sdo:string="true".
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Element referencing a DataObject with
|
|
|
|
sdo:propertyType - no support for sdo:propertyType="..."
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
<step>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
Element with bi-directional reference to a DataObject with
|
|
|
|
sdo:oppositeProperty and sdo:propertyType
|
|
|
|
- no PHP support for SDO opposite.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</step>
|
|
|
|
</procedure>
|
|
|
|
</section>
|
2005-07-19 11:16:59 +00:00
|
|
|
|
|
|
|
|
2005-07-20 10:59:47 +00:00
|
|
|
<section id='sdo-das-xml.examples'>
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
The following examples are based on the
|
|
|
|
<link linkend="sdo.sample.sequence">letter example</link>
|
|
|
|
described in the
|
2005-07-24 20:50:13 +00:00
|
|
|
<link linkend="ref.sdo">SDO documentation</link>
|
|
|
|
.
|
2005-07-21 10:14:43 +00:00
|
|
|
The examples assume the XML Schema for the letter is contained in a file
|
2005-07-20 10:59:47 +00:00
|
|
|
<filename>letter.xsd</filename>
|
|
|
|
and the letter instance is in the file
|
2005-07-24 20:50:13 +00:00
|
|
|
<filename>letter.xml</filename>
|
|
|
|
.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<example>
|
|
|
|
<title>Working with the SDO_DAS_XML Class</title>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
The following example shows how to create a SDO_DAS_XML Object and
|
|
|
|
use it to load an instance document.
|
2005-07-25 10:33:19 +00:00
|
|
|
The SDO_DAS_XML object can be created by passing the xsd file
|
2005-07-21 10:14:43 +00:00
|
|
|
to the SDO_DAS_XML::create method, which is a static method
|
|
|
|
of SDO_DAS_XML Class.
|
|
|
|
This schema file(XSD Document) can be either file available
|
|
|
|
on the local file system or it can be an URL.
|
2005-07-25 10:33:19 +00:00
|
|
|
Once we have created the SDO_DAS_XML Object,
|
2005-07-21 10:14:43 +00:00
|
|
|
we can use the same to load the instance document using
|
|
|
|
loadFromFile method.
|
|
|
|
loadFromString method can be used if want load xml instance document
|
|
|
|
which is available as string.
|
|
|
|
On successful loading of the instance document,
|
|
|
|
you will be returned with an object of type SDO_DAS_XML_Document.
|
|
|
|
Use the getRootDataObject method of SDO_DAS_XML_Document
|
|
|
|
class to get the root DataObject.
|
|
|
|
This example also tries to modify the properties of the root
|
|
|
|
DataObject and then write the changed contents back to file system.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
2005-07-25 14:15:45 +00:00
|
|
|
<programlisting role="php" id="sdo-das-xml.examples.loadfromfile">
|
2005-07-21 10:14:43 +00:00
|
|
|
<![CDATA[
|
2005-07-19 11:16:59 +00:00
|
|
|
<?php
|
|
|
|
try {
|
|
|
|
$xmldas = SDO_DAS_XML::create("letter.xsd");
|
|
|
|
$xdoc = $xmldas->loadFromFile("letter.xml");
|
|
|
|
$do = $xdoc->getRootDataObject();
|
|
|
|
$do->date = "September 03, 2004";
|
|
|
|
$do->firstName = "Anantoju";
|
|
|
|
$do->lastName = "Madhu";
|
|
|
|
$xmldas->saveDocumentToFile($xdoc, "letter-out.xml");
|
|
|
|
} catch (SDO_TypeNotFoundException $e) {
|
|
|
|
print("Type is not defined in the xsd file");
|
|
|
|
} catch (SDO_DAS_XML_ParserException $e) {
|
|
|
|
print("Problem while parsing");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
]]>
|
2005-07-20 10:59:47 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
<example>
|
|
|
|
<title>Working with the SDO_DAS_XML Class</title>
|
|
|
|
<para>
|
2005-07-25 10:33:19 +00:00
|
|
|
The above example shown, how to use the SDO_DAS_XML object to load an
|
2005-07-21 10:14:43 +00:00
|
|
|
existing instance document and change the DataObject(property values)
|
|
|
|
and write the changes back to file system.
|
|
|
|
This example shows, how to create the DataObjects dynamically and
|
|
|
|
save them as a xml string.
|
|
|
|
Please note that this example uses a company schema((
|
2005-07-20 10:59:47 +00:00
|
|
|
<link linkend="sdo.examples">company.xsd</link>
|
|
|
|
)) as defined in SDO samples section.
|
|
|
|
</para>
|
2005-07-25 14:15:45 +00:00
|
|
|
<programlisting role="php" id="sdo-das-xml.examples.createDataObject">
|
2005-07-21 10:14:43 +00:00
|
|
|
<![CDATA[
|
2005-07-19 11:16:59 +00:00
|
|
|
<?php
|
|
|
|
$xmldas = SDO_DAS_XML::create("company.xsd");
|
|
|
|
$do = $xmldas->createDataObject("companyNS", "CompanyType");
|
|
|
|
$do->name = "Acme Inc";
|
|
|
|
$dept1 = $do->createDataObject("departments");
|
|
|
|
$dept1->name = "sales";
|
|
|
|
$emp1 = $dept1->createDataObject("employees");
|
|
|
|
$emp1->name = "Fred";
|
|
|
|
$emp1->manager = FALSE;
|
|
|
|
$dept2 = $do->createDataObject("departments");
|
|
|
|
$emp2 = $dept2->createDataObject("employees");
|
|
|
|
$emp2->name = "Neil";
|
|
|
|
$emp2->manager = TRUE;
|
|
|
|
print($xmldas->saveDataObjectToString($do, "companyNS", "CompanyType"));
|
|
|
|
var_dump($do);
|
|
|
|
?>
|
|
|
|
]]>
|
2005-07-20 10:59:47 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
|
|
|
|
<example>
|
|
|
|
<title>Working with the SDO_DAS_XML Class</title>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
This example shows you how to create the DataObject and use
|
|
|
|
the Sequence API (
|
|
|
|
<link linkend="sdo.sample.sequence">
|
|
|
|
For more information on Sequence API
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
) to construct a letter containing unstructured text.
|
|
|
|
</para>
|
2005-07-25 14:15:45 +00:00
|
|
|
<programlisting role="php" id="sdo-das-xml.examples.getSequence">
|
2005-07-21 10:14:43 +00:00
|
|
|
<![CDATA[
|
2005-07-19 11:16:59 +00:00
|
|
|
<?php
|
|
|
|
try {
|
|
|
|
$xmldas = SDO_DAS_XML::create("letter.xsd");
|
|
|
|
try {
|
|
|
|
$do = $xmldas->createDataObject("http://letterSchema", "FormLetter");
|
|
|
|
$seq = $do->getSequence();
|
|
|
|
$seq->insert("April 09, 2005", NULL, 'date');
|
|
|
|
$seq->insert("Acme Inc. ", NULL, NULL);
|
|
|
|
$seq->insert("United Kingdom. ");
|
|
|
|
$seq->insert("Dear", NULL, NULL);
|
|
|
|
$seq->insert("Tarun", NULL, "firstName");
|
|
|
|
$seq->insert("Nayaraaa", NULL, "lastName");
|
|
|
|
$do->lastName = "Nayar";
|
|
|
|
$seq->insert("Please note that your order number ");
|
|
|
|
$seq->insert(12345);
|
|
|
|
$seq->insert(" has been dispatched today. Thanks for your business with us.");
|
|
|
|
$type = $do->getType();
|
|
|
|
print($xmldas->saveDataObjectToString($do, $type[0], $type[1]));
|
|
|
|
} catch (SDO_Exception $e) {
|
|
|
|
print($e);
|
|
|
|
}
|
|
|
|
} catch (SDO_TypeNotFoundException $e) {
|
|
|
|
print("Type is not defined in the xsd file");
|
|
|
|
} catch (SDO_DAS_XML_ParserException $e) {
|
|
|
|
print("Problem while parsing");
|
2005-07-20 10:59:47 +00:00
|
|
|
}
|
|
|
|
?>
|
2005-07-19 11:16:59 +00:00
|
|
|
]]>
|
2005-07-20 10:59:47 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
<example>
|
|
|
|
<title>Working with the SDO_DAS_XML_Document Class</title>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
This example shows you how to use the SDO_DAS_XML_Document class.
|
|
|
|
SDO_DAS_XML_Document class is provided to get/set
|
|
|
|
XML declarations such as version, schema location, encoding etc.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
2005-07-25 14:15:45 +00:00
|
|
|
<programlisting role="php" id="sdo-das-xml.examples.sdo_das_xml_document">
|
2005-07-21 10:14:43 +00:00
|
|
|
<![CDATA[
|
2005-07-19 11:16:59 +00:00
|
|
|
<?php
|
|
|
|
try {
|
|
|
|
$xmldas = SDO_DAS_XML::create("letter.xsd");
|
|
|
|
$xdoc = $xmldas->loadFromFile("letter.xml");
|
|
|
|
print("Encoding is set to : " . $xdoc->getEncoding());
|
2005-07-24 20:50:13 +00:00
|
|
|
print("XML Version : " . $xdoc->getXMLVersion();
|
2005-07-19 11:16:59 +00:00
|
|
|
$xdoc->setXMLVersion("1.1");
|
|
|
|
print($xmldas->saveDocumentToString($xdoc));
|
|
|
|
} catch (SDO_TypeNotFoundException $e) {
|
|
|
|
print("Type is not defined in the xsd file");
|
|
|
|
} catch (SDO_DAS_XML_ParserException $e) {
|
|
|
|
print("Problem while parsing");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
]]>
|
2005-07-20 10:59:47 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</section>
|
2005-07-19 11:16:59 +00:00
|
|
|
|
|
|
|
|
2005-07-20 10:59:47 +00:00
|
|
|
<!-- class definition section -->
|
|
|
|
<section id='sdo-das-xml.classes'>
|
2005-07-19 11:16:59 +00:00
|
|
|
&reftitle.classes;
|
2005-07-20 10:59:47 +00:00
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
The XML DAS provides three classes.
|
|
|
|
The SDO_DAS_XML which is the main class used to fetch the
|
|
|
|
data from the XML source and also can used to write the data back.
|
|
|
|
The next one is SDO_DAS_XML_Document class,
|
|
|
|
which is basically useful to get/set the XML declarations such as
|
|
|
|
encoding, version etc.
|
|
|
|
And the last class is SDO_DAS_XML_ParserException which will
|
|
|
|
be thrown for any parser exceptions while loading xsd/xml file.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<section id='sdo-das-xml.class.sdo_das_xml'>
|
|
|
|
<title>
|
|
|
|
<classname>SDO_DAS_XML</classname>
|
|
|
|
</title>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
This is the main class of XML DAS,
|
|
|
|
which is used fetch the data from the xml source
|
|
|
|
and also used to write the data back.
|
|
|
|
Other than the methods to load and save xml files,
|
|
|
|
it also has a method called createDataObject
|
|
|
|
which can be used to create an empty DataObject of a given type.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
<section id='sdo-das-xml.class.SDO_DAS_XML.methods'> &reftitle.methods;
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<link linkend='function.SDO-DAS-XML-create'>create</link>
|
2005-07-21 10:14:43 +00:00
|
|
|
This is the only static method available in SDO_DAS_XML class.
|
2005-07-25 10:33:19 +00:00
|
|
|
Used to construct SDO_DAS_XML object.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-createDataObject'>
|
|
|
|
createDataObject
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
Can be used to construct the DataObject of a given type.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-loadFromFile'>
|
|
|
|
loadFromFile
|
|
|
|
</link>
|
|
|
|
Loads the xml instance document from a file.
|
|
|
|
This file can be at local file system or it can be on a remote host.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-loadFromString'>
|
|
|
|
loadFromString
|
|
|
|
</link>
|
|
|
|
same as the above method.
|
|
|
|
Loads the xml instance which is available as string.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-saveDataObjectToFile'>
|
|
|
|
saveDataObjectToFile
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
save SDO_DataObject to a file.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-saveDataObjectToString'>
|
|
|
|
saveDataObjectToString
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
save SDO_DataObject to a xml file.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-saveDocumentToFile'>
|
|
|
|
saveDocumentToFile
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
save SDO_DAS_XML_Document object as a xml file.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-saveDocumentToString'>
|
|
|
|
saveDocumentToString
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
save SDO_DAS_XML_Document object as a xml string.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
</itemizedlist>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<section id='sdo-das-xml.class.sdo_das_xml_document'>
|
|
|
|
<title>
|
|
|
|
<classname>SDO_DAS_XML_Document</classname>
|
|
|
|
</title>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
This class can be used to get/set XML Declarations such as encoding,
|
|
|
|
schema location etc.
|
2005-07-20 10:59:47 +00:00
|
|
|
</para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<section id='sdo-das-xml.class.SDO_DAS_XML_Document.methods'>
|
|
|
|
&reftitle.methods;
|
2005-07-20 10:59:47 +00:00
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-getEncoding'>
|
|
|
|
getEncoding
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
gets the encoding string.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-getNoNamespaceSchemaLocation'>
|
|
|
|
getNoNamespaceSchemaLocation
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
gets the no namespace schema location.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-getRoorDataObject'>
|
|
|
|
getRootDataObject
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
gets the root DataObject.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-getRootElementName'>
|
|
|
|
getRootElementName
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
gets the root DataObject's name.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-getRootElementURI'>
|
|
|
|
getRootElementURI
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
gets the root DataObject's URI.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-getSchemaLocation'>
|
|
|
|
getSchemaLocation
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
gets schema location.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-getXMLDeclaration'>
|
|
|
|
getXMLDeclaration
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
gets whether xml declaration is set ot not.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-getXMLVersion'>
|
|
|
|
getXMLVersion
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
gets the xml version.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-setEncoding'>
|
|
|
|
setEncoding
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
sets the encoding string with the given value.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-setNoNamespaceSchemaLocation'>
|
|
|
|
setNoNamespaceSchemaLocation
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
sets the no namespace schema location with the given value.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-setSchemaLocation'>
|
|
|
|
setSchemaLocation
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
sets the schema location with the given value.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-setXMLDeclaration'>
|
|
|
|
setXMLDeclaraion
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
to set/unset the xml declaration.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2005-07-19 11:16:59 +00:00
|
|
|
|
|
|
|
|
2005-07-21 10:14:43 +00:00
|
|
|
|
2005-07-20 10:59:47 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2005-07-21 10:14:43 +00:00
|
|
|
<link linkend='function.SDO-DAS-XML-Document-setXMLVersion'>
|
|
|
|
setXMLVersion
|
|
|
|
</link>
|
2005-07-20 10:59:47 +00:00
|
|
|
sets the xml version with the given value.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section id='sdo-das-xml.class.sdo_das_xml_parserexception'>
|
|
|
|
<title>
|
|
|
|
<classname>SDO_DAS_XML_ParserException</classname>
|
|
|
|
</title>
|
|
|
|
<para>
|
|
|
|
Is a subclass of
|
2005-07-24 20:50:13 +00:00
|
|
|
<classname>SDO_Exception</classname>
|
|
|
|
.
|
2005-07-20 10:59:47 +00:00
|
|
|
Thrown for any parser errors while loading the xsd/xml file.
|
|
|
|
</para>
|
|
|
|
</section>
|
2005-07-19 11:16:59 +00:00
|
|
|
</section>
|
|
|
|
|
2005-07-20 10:59:47 +00:00
|
|
|
</partintro>
|
2005-07-19 11:16:59 +00:00
|
|
|
&reference.sdo-das-xml.functions;
|
|
|
|
</reference>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|