Skip to content

XML

nil visible for xml

This feature allows to force showing empty line for NULL values. Forcing empty tags might be useful when combining data with other requests to keep data in order. By default empty values are not shown to reduce document length.

Usage:

?nil_visible=[True_or_False]

Value type: boolean (True or False)

Default: False

Applicable to: list of resources, list of arrays, vector, single resource, single array, scalar

Examples:

/Customer/CustomerId,Company.xml - not showing empty tags by default

/Customer/CustomerId,Company.xml?nil_visible=False - not showing empty tags

/Customer/CustomerId,Company.xml?nil_visible=True - showing tags with no value


href for xml

This feature allows to control presence of URL references in the output. Query string href overrides INI settings xml_sdb.href.

Usage:
URL

?href=[true_or_false]

INI settings

xml_sdb.href = [true_or_false]

Value type: boolean (True or False)

Default: True

Applicable to: list of resources, list of arrays, vectors, single resource, single array, scalar

Examples:
/Chinook/Artist/ArtistId/1.xml?href=false - URL references don't appear in output.

<?xml version="1.0" encoding="utf-8"?>
<SlashDB xmlns="http://www.vtenterprise.com/slashdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.vtenterprise.com/slashdb https://demo.slashdb.com/db/Chinook/Artist.xsd?cardinality=1">
    <Artist>
        <ArtistId>1</ArtistId>
        <Name>AC/DC</Name>
    </Artist>
</SlashDB>

/Chinook/Artist/ArtistId/1.xml?href=true - URL references appear in output.

<?xml version="1.0" encoding="utf-8"?>
<SlashDB xmlns="http://www.vtenterprise.com/slashdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.vtenterprise.com/slashdb https://demo.slashdb.com/db/Chinook/Artist.xsd?cardinality=1">
    <Artist href="/db/Chinook/Artist/ArtistId/1.xml">
        <ArtistId>1</ArtistId>
        <Album href="/db/Chinook/Artist/ArtistId/1/Album.xml" />
        <Name>AC/DC</Name>
    </Artist>
</SlashDB>