SDO DAS XML Funktionen
Vordefinierte Klassen
The XML DAS provides two main classes. The first is SDO_DAS_XML which is the main class used to fetch the data from the XML source and used to write the data back. The second is the SDO_DAS_XML_Document class, which represents the data in the XML document.
There are also some exception classes which can be thrown if errors are found when looking for or parsing the xsd or xml files.
SDO_DAS_XML
This is the main class of the 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,
Methoden
-
create This is a static method available in the SDO_DAS_XML class. Used to construct an SDO_DAS_XML object.
-
addTypes Works in much the same way as create() but used to add the contents of a second or subsequent schema file to an XML DAS that has already been created.
-
createDataObject Can be used to construct an SDO data object of a given type.
-
createDocument Can be used to construct an XML Document object from scratch.
-
loadFile Loads the xml instance document from a file. This file can be at local file system or it can be on a remote host.
-
loadString same as the above method. Loads the xml instance which is available as string.
-
saveFile save SDO_DAS_XML_Document object as a xml file.
-
saveString save SDO_DAS_XML_Document object as a xml string.
SDO_DAS_XML_Document
This class can be used to get to the name and namespace of the document element, and to get to the root data object of the document. Lastly, it can also be used to set the XML version and encoding of a document on output.
Methoden
-
getRootDataObject gets the root DataObject.
-
getRootElementName gets the root DataObject's name.
-
getRootElementURI gets the root DataObject's URI.
-
setEncoding sets the encoding string with the given value.
-
setXMLDeclaraion to set/unset the xml declaration.
-
setXMLVersion sets the xml version with the given value.
SDO_DAS_XML_ParserException
Is a subclass of SDO_Exception. Thrown for any parser errors while loading the xsd/xml file.
SDO_DAS_XML_FileException
Is a subclass of SDO_Exception. Thrown by any of the methods that load data from a file, when the file cannot be found.
Limitations compared with SDO 2.0 specification
The » SDO 2.0 specification 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 Service. The XML DAS implements the mapping described in the SDO 2.0 specification with some restrictions. A detailed list is of the limitations is:
-
Simple Type with sdoJava:instanceClass - no PHP equivalent provided.
-
Simple Type with sdoJava:extendedInstanceClass - no PHP equivalent provided.
-
Simple Type with list of itemType.
-
Simple Type with union.
-
Complex Type with sdo:aliasName - no PHP support for SDO Type aliases.
-
Attribute with sdo:aliasName - no PHP support for SDO property aliases.
-
Attribute with default value - no PHP support for SDO property defaults.
-
Attribute with fixed value - no PHP support for SDO read-only properties or default values.
-
Attribute referencing a DataObject with sdo:propertyType - no support for sdo:propertyType="...".
-
Attribute with bi-directional property to a DataObject with sdo:oppositeProperty and sdo:propertyType - no PHP support for SDO opposite.
-
Element with sdo:aliasName - no PHP support for SDO property aliases.
-
Element with substitution group.
-
Element of SimpleType with default - no PHP support for SDO defaults
-
Element of SimpleType with fixed value - no PHP support for SDO read-only properties or default values.
-
Element of SimpleType with sdo:string - no support for sdo:string="true".
-
Element referencing a DataObject with sdo:propertyType - no support for sdo:propertyType="..."
-
Element with bi-directional reference to a DataObject with sdo:oppositeProperty and sdo:propertyType - no PHP support for SDO opposite.
Inhaltsverzeichnis
- SDO_DAS_XML::addTypes — To load a second or subsequent schema file to a SDO_DAS_XML object
- SDO_DAS_XML::create — To create SDO_DAS_XML object for a given schema file
- SDO_DAS_XML::createDataObject — Creates SDO_DataObject for a given namespace URI and type name
- SDO_DAS_XML::createDocument — Creates an XML Document object from scratch, without the need to load a document from a file or string
- SDO_DAS_XML::loadFile — Returns SDO_DAS_XML_Document object for a given path to xml instance document
- SDO_DAS_XML::loadString — Returns SDO_DAS_XML_Document for a given xml instance string
- SDO_DAS_XML::saveFile — Saves the SDO_DAS_XML_Document object to a file
- SDO_DAS_XML::saveString — Saves the SDO_DAS_XML_Document object to a string
- SDO_DAS_XML_Document::getRootDataObject — Returns the root SDO_DataObject
- SDO_DAS_XML_Document::getRootElementName — Returns root element's name
- SDO_DAS_XML_Document::getRootElementURI — Returns root element's URI string
- SDO_DAS_XML_Document::setEncoding — Sets the given string as encoding
- SDO_DAS_XML_Document::setXMLDeclaration — Sets the xml declaration
- SDO_DAS_XML_Document::setXMLVersion — Sets the given string as xml version
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 30/01/2003, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/php-rf-ref.sdo-das-xml.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.