---
schema_version: "1"
id: 6ed7d6eee4fb3144a62d500fb47129e314b67cca4bb4d3219058b589723948ad
title: docTypeAsString
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.8/dw-dtd-functions-doctypeasstring.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.8/dw-dtd-functions-doctypeasstring
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3e9c6cfa41814e35c046eb03ff1d6425584b8c6fb39a43cb59ca499806e827c9
description: MuleSoft Documentation Site
release: "2.8"
latest: false
---
# docTypeAsString

## [](#doctypeasstring1)docTypeAsString(docType: DocType): String

`DocType`​ 値を文字列表現に変換します。

_DataWeave バージョン 2.5.0 で導入されました。_

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 20%;">
<col style="width: 20%;">
<col style="width: 60%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">型</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>docType</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">DocType</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">文字列に変換する ​<code>DocType</code>​ 値。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、​`systemId`​ が含まれる ​`DocType`​ 値を文字列表現に変換します。

#### [](#ソース)ソース

```DataWeave
%dw 2.0
import * from dw::xml::Dtd
output application/json
---
docTypeAsString({rootName: "cXML", systemId: "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd"})
```

#### [](#出力)出力

```Json
"cXML SYSTEM http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd"
```

### [](#例-2)例

次の例では、​`publicId`​ と ​`systemId`​ が含まれる ​`DocType`​ 値を文字列表現に変換します。

#### [](#ソース-2)ソース

```DataWeave
%dw 2.0
import * from dw::xml::Dtd
output application/json
---
docTypeAsString({rootName: "html", publicId: "-//W3C//DTD XHTML 1.0 Transitional//EN", systemId: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"})
```

#### [](#出力-2)出力

```Json
"html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
```