XmlDocumentFragment.InnerXml プロパティ
アセンブリ: System.Xml (system.xml.dll 内)

Dim instance As XmlDocumentFragment Dim value As String value = instance.InnerXml instance.InnerXml = value
public: virtual property String^ InnerXml { String^ get () override; void set (String^ value) override; }
/** @property */ public String get_InnerXml () /** @property */ public void set_InnerXml (String value)
public override function get InnerXml () : String public override function set InnerXml (value : String)
このノードの子のマークアップ。


このプロパティを設定すると、ノードの子を指定された文字列の解析済みの内容に置き換えます。解析は、現在の名前空間コンテキストで実行されます。
このプロパティは、ドキュメント オブジェクト モデル (DOM: Document Object Model) に対する Microsoft 拡張機能です。

InnerXml プロパティを使用してドキュメントのフラグメントの内容を設定する例を次に示します。
Option Explicit Option Strict Imports System Imports System.IO Imports System.Xml Public Class Sample Public Shared Sub Main() ' Create the XmlDocument. Dim doc As New XmlDocument() ' Create a document fragment. Dim docFrag As XmlDocumentFragment = doc.CreateDocumentFragment() ' Set the contents of the document fragment. docFrag.InnerXml = "<item>widget</item>" ' Display the document fragment. Console.WriteLine(docFrag.InnerXml) End Sub 'Main End Class 'Sample
using System; using System.IO; using System.Xml; public class Sample { public static void Main() { // Create the XmlDocument. XmlDocument doc = new XmlDocument(); // Create a document fragment. XmlDocumentFragment docFrag = doc.CreateDocumentFragment(); // Set the contents of the document fragment. docFrag.InnerXml ="<item>widget</item>"; // Display the document fragment. Console.WriteLine(docFrag.InnerXml); } }
#using <System.Xml.dll> using namespace System; using namespace System::IO; using namespace System::Xml; int main() { // Create the XmlDocument. XmlDocument^ doc = gcnew XmlDocument; // Create a document fragment. XmlDocumentFragment^ docFrag = doc->CreateDocumentFragment(); // Set the contents of the document fragment. docFrag->InnerXml = "<item>widget</item>"; // Display the document fragment. Console::WriteLine( docFrag->InnerXml ); }
import System.*; import System.IO.*; import System.Xml.*; public class Sample { public static void main(String[] args) { // Create the XmlDocument. XmlDocument doc = new XmlDocument(); // Create a document fragment. XmlDocumentFragment docFrag = doc.CreateDocumentFragment(); // Set the contents of the document fragment. docFrag.set_InnerXml("<item>widget</item>"); // Display the document fragment. Console.WriteLine(docFrag.get_InnerXml()); } //main } //Sample

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からXmlDocumentFragment.InnerXml プロパティを検索する場合は、下記のリンクをクリックしてください。

- XmlDocumentFragment.InnerXml プロパティのページへのリンク