Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Exporting metadata – PB Docs 2021 – PowerBuilder Library

Exporting metadata – PB Docs 2021

Exporting metadata

You can specify that metadata in the form of a DTD or schema
should be exported when you save the DataWindow object. You can
choose to save the metadata with the XML or in a separate
file.

If you export metadata as a schema, you can associate it with
a namespace. See Associating a namespace
with an exported schema
.

To specify how metadata should be saved, select a value from
the Meta Data Type drop-down list or set the Export.XML.MetaDataType
property. The possible values are:

  • XMLNone!—No metadata is generated

  • XMLSchema!—An XML schema is generated

  • XMLDTD!—A DTD is generated

If the data item for a column is null or an empty string, an
empty element is created. If you select XMLSchema!, child elements
with null data items are created with the content
“xsi:nil=’true'”.

The metadata is saved into the exported XML itself or into an
associated file, depending on the setting in the SaveMeta Data
drop-down list or the Export.XML.SaveMetaData property. The possible
values are:

  • MetaDataInternal!—The metadata is saved into the generated
    XML document or string. To save metadata using the .Data.XML
    expression syntax, you must use this value.

  • MetaDataExternal!—The metadata is saved as an external
    file with the same name as the XML document but with the
    extension .xsd (for a schema) or .dtd (for a DTD). A reference
    to the name of the metadata file is included in the output XML
    document.

Example: internal
metadata

For example, if you select XMLDTD! and MetaDataInternal!, the
header and first row of the exported XML would look like this for a
simple grid DataWindow for the contact table in the PB Demo DB. The
Include Whitespace property has also been selected and the file name
is dtdinternal.xml:

Example: external
metadata

If you select MetaDataExternal! instead, the generated XML in
dtdexternal.xml looks like this:

The DTD is in dtdexternal.dtd:

MetaDataExternal! not supported for dot notation

The metadata cannot be saved in an external file if you use
dot notation to generate the XML.

Associating a namespace
with an exported schema

If you export metadata in the form of a schema, you can
associate a namespace with the schema. To do so, right-click the
root element in the Export/Import template view and select Schema
Options from the pop-up menu. In the dialog box, specify the
namespace prefix and URI.

When the Meta Data Type property is XMLSchema! and the Save
Meta Data property is MetaDataInternal!, so that the XML schema is
generated inline, you can specify a name for the root element. If
the root element name is specified, it appears in the generated
XML.

In the following example, the root element name is Contacts,
the namespace prefix is po, and the URI is
http://www.example.com/PO1.

The example shows the header and the first row of the
generated XML:

By default, the generated XML is not associated with a
namespace.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x