前のページ次のページ上に戻るホーム BREW C++ ライブラリ & GUI フレームワーク & XML ミドルウェア : SophiaFramework UNIVERSE 5.0
SFXXMLDocument
[XML] Document ノードを表すクラスです。
#include <SFXXMLDocument.hpp>
class SFXXMLDocument : public SFXXMLNode;
SFMTYPEDEFCLASS(SFXXMLDocument)

継承図

SFXXMLDocument クラスの継承図

協調図

SFXXMLDocument クラスの協調図

解説

Document ノード (SFXXMLDocument) は、 XML 文書の文書を保持します。

[Note] 注意
Document ノードは、DOM ツリーで最上位に位置するルート ノードです。
[Note] 注意
ノードを生成するための SFXXMLDocument::CreateTextNode 関数や SFXXMLDocument::CreateElement 関数などは Document ノード(SFXXMLDocument) からしか使えません。

参照

SFXXMLNode | SFXXMLAttribute | SFXXMLCDATASection | SFXXMLComment | SFXXMLDocumentFragment | SFXXMLDocumentType | SFXXMLElement | SFXXMLEntity | SFXXMLEntityReference | SFXXMLNotation | SFXXMLProcessingInstruction | SFXXMLText

メンバ

コンストラクタ/デストラクタ
SFXXMLDocument( Void )
SFXXMLDocument クラスのコンストラクタです。
~SFXXMLDocument( Void )
SFXXMLDocument クラスのデストラクタです。
パブリック関数
SFCError AppendChild( SFXXMLNodeConstPtr newchild )
子ノードの最後にノードを追加します。
SFCError CloneNode( SFXXMLNodeHandle clonenode , Bool deep )
ノードのコピーを作成します。
SFXXMLAttributePtr CreateAttribute( SFXAnsiStringConstRef name , SFXAnsiStringConstRef value )
Attribute ノードを作成します。
SFXXMLAttributePtr CreateAttributeNS( SFXAnsiStringConstRef name , SFXAnsiStringConstRef namespaceURI )
修飾名と名前空間 URI を持つ Attribute ノードを作成します。
SFXXMLCDATASectionPtr CreateCDATASection( SFXAnsiStringConstRef data )
指定した文字列を値に持つ CDATASection ノードを作成します。
SFXXMLCommentPtr CreateComment( SFXAnsiStringConstRef data )
指定した文字列を値に持つ Comment ノードを作成します。
SFXXMLDocumentFragmentPtr CreateDocumentFragment( Void )
空の DocumentFragment ノードを作成します。
SFXXMLDocumentTypePtr CreateDocumentType( SFXAnsiStringConstRef name , SFXAnsiStringConstRef publicId , SFXAnsiStringConstRef systemId )
空の DocumentType ノードを作成します。
SFXXMLElementPtr CreateElement( SFXAnsiStringConstRef name )
指定した名前を持つ Element ノードを作成します。
SFXXMLElementPtr CreateElementNS( SFXAnsiStringConstRef name , SFXAnsiStringConstRef namespaceURI )
指定した修飾名と名前空間 URI を持つ Element ノードを作成します。
SFXXMLEntityPtr CreateEntity( SFXAnsiStringConstRef name )
Entity ノードを作成します。
SFXXMLEntityReferencePtr CreateEntityReference( SFXAnsiStringConstRef name )
EntityReference ノードを作成します。
SFXXMLNotationPtr CreateNotation( SFXAnsiStringConstRef name )
指定した名前を持つ Notation ノードを作成します。
SFXXMLProcessingInstructionPtr CreateProcessingInstruction( SFXAnsiStringConstRef target , SFXAnsiStringConstRef data )
指定した名前と文字列を持つ ProcessingInstruction ノードを作成します。
SFXXMLTextPtr CreateTextNode( SFXAnsiStringConstRef data )
指定した文字列を含む Text ノードを作成します。
DOMNodeListPtr GetChildNodes( Void )
すべての子ノードを取得します。
SFXXMLElementPtr GetDocumentElement( Void )
Document ノード ( ルート ノード )を取得します。
SFXXMLDocumentTypePtr GetDocumentType( Void )
DocumentType ノードを取得します。
DOMNodeListPtr GetElementsByTagName( SFXAnsiStringConstRef tag , SFXXMLNodeConstPtr root = null )
指定したタグ名を持つ、すべての Element ノードを取得します。
ACharConstPtr GetEncoding( Void )
エンコーディングを取得します。
SFXXMLNodePtr GetFirstChild( Void )
最初の子ノードを取得します。
SFXXMLNodePtr GetLastChild( Void )
最後の子ノードを取得します。
DOMNodeListPtr GetListsByTypeFilter( NodeType type )
指定したノード タイプに一致する、すべてのノードを取得します。
ACharConstPtr GetNodeName( Void )
ノード名を取得します。
NodeType GetNodeType( Void )
ノード タイプを取得します。
Bool GetStandalone( Void )
Standalone かどうかを取得します。
ACharConstPtr GetVersion( Void )
バージョン番号を取得します。
Bool HasChildNodes( Void )
子ノードを持つかどうかを判定します。
SFCError InsertBefore( SFXXMLNodeConstPtr newchild , SFXXMLNodeConstPtr refchild )
ノードを挿入します。
SFCError RemoveChild( SFXXMLNodeConstPtr oldchild )
子孫ノードも含めて子ノードを削除します。
SFCError ReplaceChild( SFXXMLNodeConstPtr newchild , SFXXMLNodeConstPtr oldchild )
子ノードを置換します。
SFCError Save( SFXAnsiStringConstRef output , Bool indent = true )
Save( SFXOutputStreamRef output , Bool indent = true )
Save( SFXPathConstRef output , Bool indent = true )
ファイルに保存します。
Void SetDocumentType( SFXXMLDocumentTypeConstPtr doctype )
DocumentType ノードを設定します。
Void SetEncoding( SFXAnsiStringConstRef encoding )
エンコーディングを設定します。
Void SetStandalone( Bool standalone )
Standalone かどうかを設定します。
Void SetVersion( SFXAnsiStringConstRef version )
バージョン番号を設定します。
Bool EqualNode( SFXXMLNodeConstPtr arg ) (SFXXMLNode から継承)
指定したノードと同等かどうかを判定します。
SFXXMLNodePtr GetNextSibling( Void ) (SFXXMLNode から継承)
次の兄弟ノードを取得します。
ACharConstPtr GetNodeValue( Void ) (SFXXMLNode から継承)
ノードの値を取得します。
SFXXMLNodePtr GetParentNode( Void ) (SFXXMLNode から継承)
親ノードを取得します。
SFXXMLNodePtr GetPreviousSibling( Void ) (SFXXMLNode から継承)
前の兄弟ノードを取得します。
SFXAnsiString GetText( Void ) (SFXXMLNode から継承)
ノード テキストを取得します。
Bool IsSameNode( SFXXMLNodeConstPtr other ) (SFXXMLNode から継承)
指定したノードと同一であるかを判定します。
Void SetNodeValue( ACharConstPtr value ) (SFXXMLNode から継承)
ノードに値を設定します。
SFCError SetText( SFXAnsiStringConstRef text ) (SFXXMLNode から継承)
ノード テキストを設定します。
DOMNamedNodeMap (SFXXMLNode から継承)
複数の DOM ノードを名前で管理するためのクラスです。
DOMNodeList (SFXXMLNode から継承)
複数の DOM ノードをリスト形式で管理するためのクラスです。
NodeType (SFXXMLNode から継承)
ノード タイプの数値です。

SFXXMLDocument::SFXXMLDocument
SFXXMLDocument クラスのコンストラクタです。
[ public, explicit ]
SFXXMLDocument(Void);

SFXXMLDocument::~SFXXMLDocument
SFXXMLDocument クラスのデストラクタです。
[ public, virtual ]
virtual ~SFXXMLDocument(Void);

SFXXMLDocument::AppendChild
子ノードの最後にノードを追加します。
[ public, virtual ]
SFCError AppendChild(
    SFXXMLNodeConstPtr newchild   // 追加するノード
);

戻り値

  • 成功したとき : SFERR_NO_ERROR
  • 引数が不正であるとき : SFERR_INVALID_PARAM
  • メモリ不足のとき : SFERR_NO_MEMORY

解説

newchild ノードをコピーせずにそのまま追加します。

newchild ノードが別の DOM ツリー内に存在する場合、その DOM ツリー内からは削除されます。

参照

SFXXMLNode::AppendChild


SFXXMLDocument::CloneNode
ノードのコピーを作成します。
[ public, virtual ]
SFCError CloneNode(
    SFXXMLNodeHandle clonenode   // コピー先のノード(Handle 型)
    Bool deep                    // 子ノードが再帰的にコピーされるかどうか
);

引数

clonenode

コピー先ノードを指定します。

deep

true の場合、子ノードを再帰的にコピーします。

false の場合、ノード自身だけをコピーします。

戻り値

  • 成功したとき : SFERR_NO_ERROR
  • 失敗したとき : SFERR_FAILED

参照

SFXXMLNode::CloneNode


SFXXMLDocument::CreateAttribute
Attribute ノードを作成します。
[ public ]
SFXXMLAttributePtr CreateAttribute(
    SFXAnsiStringConstRef name    // 属性の名前
    SFXAnsiStringConstRef value   // 属性の値
);

戻り値

Attribute ノード(SFXXMLAttribute)、または null を返します。

解説

修飾名と名前空間 URI を持つ Attribute ノードを作成するには、 SFXXMLDocument::CreateAttributeNS 関数を使います。

作成した Attribute ノードを Element ノード ( SFXXMLElement ) に設定するには、 SFXXMLElement::SetAttributeNode 関数、または、 SFXXMLElement::SetAttribute 関数を使います。

使用例

// Attribute ノードを作成する ( 属性値も設定する ) 
SFXXMLAttributePtr atti = document.CreateAt tribute("ISBN", "4-7741-1616-5");
// Attribute ノードを Element ノードに設定する 
book->SetAttributeNode(atti);

参照

SFXXMLElement::SetAttributeNode | SFXXMLElement::SetAttribute | SFXXMLDocument::CreateAttributeNS | SFXXMLAttribute | SFXXMLElement | SFXXMLNode


SFXXMLDocument::CreateAttributeNS
修飾名と名前空間 URI を持つ Attribute ノードを作成します。
[ public ]
SFXXMLAttributePtr CreateAttributeNS(
    SFXAnsiStringConstRef name           // 修飾名
    SFXAnsiStringConstRef namespaceURI   // 名前空間 URI
);

解説

Attribute ノード( SFXXMLAttribute )、または null を返します。

使用例

// 修飾名と名前空間 URI を持つ Attribute ノードを作成する 
SFXXMLAttributePtr atti = document.CreateAttributeNS("book:isbn","http://www.w3.org/book");
// 属性値を設定する 
atti->SetValue("4-7741-1616-5");
// Attribute ノードを Element ノードに設定する 	
book->SetAttributeNode(atti);

参照

SFXXMLElement::SetAttributeNode | SFXXMLElement::SetAttribute | SFXXMLDocument::CreateAttribute | SFXXMLAttribute | SFXXMLElement | SFXXMLNode


SFXXMLDocument::CreateCDATASection
指定した文字列を値に持つ CDATASection ノードを作成します。
[ public ]
SFXXMLCDATASectionPtr CreateCDATASection(
    SFXAnsiStringConstRef data   // CDATASection に格納する文字列
);

戻り値

CDATASection ノード( SFXXMLCDATASection )、または null を返します。

使用例

<![CDATA[<AUTHOR age="5">Sophia Cradle</AUTHOR>]]> という CDATASection ノードを作成します。

// CDATASection ノードを作成する 	
book->SetAttributeNode(atti);
SFXXMLCDATASectionPtr cdata = document.CreateCDATASection("<AUTHOR age=\"5\">Sophia Cradle</AUTHOR>");
// CDATASection ノードを Element ノードに設定する 	
book->SetAttributeNode(atti);
boot->AppendChild(SFXXMLNodePtr(cdata));
>

参照

SFXXMLCDATASection | SFXXMLNode


SFXXMLDocument::CreateComment
指定した文字列を値に持つ Comment ノードを作成します。
[ public ]
SFXXMLCommentPtr CreateComment(
    SFXAnsiStringConstRef data   // このノードに格納する文字列
);

戻り値

Comment ノード( SFXXMLComment )、または null を返します。

使用例

「this a test code!」 という内容の Comment ノードを作成します。

// Comment ノードを作成する 	
SFXXMLCommentPtr cdata = document.CreateComment("this a test code!");
// Comment ノードを Element ノードに追加する 	
boot->AppendChild(SFXXMLNodePtr(cdata));

参照

SFXXMLComment | SFXXMLNode


SFXXMLDocument::CreateDocumentFragment
空の DocumentFragment ノードを作成します。
[ public ]
SFXXMLDocumentFragmentPtr CreateDocumentFragment(Void);

戻り値

DocumentFragment ノード( SFXXMLDocumentFragment )、または null を返します。

参照

SFXXMLDocumentFragment | SFXXMLNode


SFXXMLDocument::CreateDocumentType
空の DocumentType ノードを作成します。
[ public ]
SFXXMLDocumentTypePtr CreateDocumentType(
    SFXAnsiStringConstRef name       // 作成する文書型の修飾名
    SFXAnsiStringConstRef publicId   // 外部サブセットの公開識別子
    SFXAnsiStringConstRef systemId   // 外部サブセットのシステム識別子
);

戻り値

DocumentType ノード( SFXXMLDocumentType )、または null を返します。

使用例

<!DOCTYPE boot PUBLIC "public-boot.dtd"> という DocumentType ノードを作成します。

// DocumentType ノードを作成する
SFXXMLDocumentTypePtr doctype = document.CreateDocumentType("boot","public-boot.dtd","");
// DocumentType ノードを追加する
document.AppendChild(SFXXMLNodePtr(doctype));

参照

SFXXMLDocumentType | SFXXMLNode


SFXXMLDocument::CreateElement
指定した名前を持つ Element ノードを作成します。
[ public ]
SFXXMLElementPtr CreateElement(
    SFXAnsiStringConstRef name   // Element ノードの名前
);

戻り値

Element ノード( SFXXMLElement )、または null を返します。

解説

修飾名と名前空間 URI を持つ Element ノードを作成するには、SFXXMLDocument::CreateElementNS 関数を使います。

参照

SFXXMLDocument::CreateElementNS | SFXXMLElement | SFXXMLNode


SFXXMLDocument::CreateElementNS
指定した修飾名と名前空間 URI を持つ Element ノードを作成します。
[ public ]
SFXXMLElementPtr CreateElementNS(
    SFXAnsiStringConstRef name           //要素の修飾名 
    SFXAnsiStringConstRef namespaceURI   //作成する要素の名前空間 URI 
);

戻り値

Element ノード( SFXXMLElement )、または null を返します。

使用例

<xsd:node xmlns:xsd="http://www.w3.org/xsd">node element</xsd:node> という Element ノードを作成します。

// Element ノードを作成する ( URI は http://www.w3.org/xsd )
SFXXMLElementPtr element = document.CreateElementNS("xsd:node", "http://www.w3.org/xsd");
// Element ノードにテキストを設定する
element->SetText("node element");
// Element ノードを追加する
boot->AppendChild(element);

参照

SFXXMLDocument::CreateElement | SFXXMLElement | SFXXMLNode


SFXXMLDocument::CreateEntity
Entity ノードを作成します。
[ public ]
SFXXMLEntityPtr CreateEntity(
    SFXAnsiStringConstRef name   // エンティティの名前
);

戻り値

Entity ノード( SFXXMLEntity )、または null を返します。

解説

作成した Entity ノードは DocumentType ノードに追加します。 Entity ノードに対して SFXXMLDocument::AppendChild 関数は使えません。

使用例

<!ENTITY copyright "Copyright 2007, Sophia. All rights reserved"> という Entity ノードを作成します。

//  Entity ノードを作成する
SFXXMLEntityPtr entity = document.CreateEntity("copyright \"Copyright 2007, Sophia. All rights reserved\"");
// Entity ノードを追加する
doctype->GetEntities()->SetNamedItem(entity);

参照

SFXXMLDocument::CreateEntityReference | SFXXMLEntity | SFXXMLDocumentType SFXXMLNode


SFXXMLDocument::CreateEntityReference
EntityReference ノードを作成します。
[ public ]
SFXXMLEntityReferencePtr CreateEntityReference(
    SFXAnsiStringConstRef name   // 参照するエンティティの名前
);

戻り値

EntityReference ノード( SFXXMLEntityReference )、または null を返します。

使用例

"copyright" に対する EntityReference ノードを作成します。

// EntityReference ノードを作成する
SFXXMLEntityReferencePtr entityref = document.CreateEntityReference("copyright");
// EntityReference ノードを追加する
boot->AppendChild(SFXXMLNodePtr(entityref));

参照

SFXXMLDocument::CreateEntity | SFXXMLEntityReference | SFXXMLNode


SFXXMLDocument::CreateNotation
指定した名前を持つ Notation ノードを作成します。
[ public ]
SFXXMLNotationPtr CreateNotation(
    SFXAnsiStringConstRef name   // 記法の名前
);

戻り値

Notation ノード( SFXXMLNotation )、または null を返します。

解説

作成した Notation ノードは DocumentType ノードに設定します。 Notation ノードに対して SFXXMLDocument::AppendChild 関数は使えません。

使用例

<!NOTATION XLS PUBLIC "http://www.microsoft.com/office/excel/"> という Notation ノードを作成します。

// Notation ノードを作成する 
SFXXMLNotationPtr notation = document.CreateNotation("XLS");
// PUBLIC 公開識別子を設定する 
notation->SetPublicID("http://www.microsoft.com/office/excel/");
// Notation ノードを設定する  
doctype->GetNotations()->SetNamedItem(notation);

参照

SFXXMLNotation | SFXXMLDocumentType SFXXMLNode


SFXXMLDocument::CreateProcessingInstruction
指定した名前と文字列を持つ ProcessingInstruction ノードを作成します。
[ public ]
SFXXMLProcessingInstructionPtr CreateProcessingInstruction(
    SFXAnsiStringConstRef target   // 処理命令のターゲット
    SFXAnsiStringConstRef data     // 処理命令の内容
);

戻り値

ProcessingInstruction ノード( SFXXMLProcessingInstruction )、または null を返します。

使用例

<?xml-stylesheet type="text/xsl" href="viewer.xsl"?> という ProcessingInstruction ノードを作成します。

// ProcessingInstruction ノードを作成する
SFXXMLProcessingInstructionPtr pi = document.CreateProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"viewer.xsl\");
// ProcessingInstruction ノードを追加する
document.AppendChild(pi);

参照

SFXXMLProcessingInstruction | SFXXMLNode


SFXXMLDocument::CreateTextNode
指定した文字列を含む Text ノードを作成します。
[ public ]
SFXXMLTextPtr CreateTextNode(
    SFXAnsiStringConstRef data   // テキスト
);

戻り値

Text ノード ( SFXXMLText )、または null を返します。

使用例

//  Text ノードを作成し、追加する
element->AppendChild(SFXXMLNodePtr(document.CreateTextNode("新たなテキスト ノード")));

参照

SFXXMLText | SFXXMLNode


SFXXMLDocument::GetChildNodes
すべての子ノードを取得します。
[ public, virtual, const ]
DOMNodeListPtr GetChildNodes(Void);

戻り値

指定したノードのすべての子ノードを SFXXMLNode::DOMNodeList へのポインタとして返します。子ノードがないときは null を返します。

解説

[Note] 注意
SFXXMLNode::DOMNodeList の各要素は、SFXXMLNode 型へのポインタです。

参照

SFXXMLNode::DOMNodeList | SFXXMLNode::GetChildNodes | SFXXMLNode


SFXXMLDocument::GetDocumentElement
Document ノード ( ルート ノード )を取得します。
[ public, const ]
SFXXMLElementPtr GetDocumentElement(Void);

使用例

// Document ノード ( ルート ノード )を取得する 
SFXXMLElementPtr root = document.GetDocumentElement();

参照

SFXXMLDocument | SFXXMLElement | SFXXMLNode


SFXXMLDocument::GetDocumentType
DocumentType ノードを取得します。
[ public, const ]
SFXXMLDocumentTypePtr GetDocumentType(Void);

参照

SFXXMLDocument::SetDocumentType | SFXXMLDocumentType | SFXXMLNode


SFXXMLDocument::GetElementsByTagName
指定したタグ名を持つ、すべての Element ノードを取得します。
[ public, const ]
DOMNodeListPtr GetElementsByTagName(
    SFXAnsiStringConstRef tag        // タグ名
    SFXXMLNodeConstPtr root = null   // 親ノード
);

引数

tag

大文字と小文字は区別されます。

root

root 引数に null が渡されたとき: ドキュメント全体を検索して、指定したタグ名を持つ Element ノードのリストを返します。

root 引数にノードが渡されたとき: 渡されたノードの子孫ノードを検索して、指定したタグ名を持つ Element ノードのリストを返します。

戻り値

タグ名が一致するすべての要素とする SFXXMLNode::DOMNodeList を返します。

解説

指定したタグ名を持つすべての Element ノードを SFXXMLNode::DOMNodeList に格納して取得します。

ノード タイプを指定する場合は、SFXXMLDocument::GetListsByTypeFilter 関数を使います。

[Note] 注意
SFXXMLElement::GetElementsByTagName 関数は、内部的に root 引数に特定のノードを指定して SFXXMLDocument::GetElementsByTagName 関数を呼び出しています。

参照

SFXXMLDocument::GetListsByTypeFilter | SFXXMLElement::GetElementsByTagName | SFXXMLElement | SFXXMLNode | SFXXMLNode::DOMNodeList


SFXXMLDocument::GetEncoding
エンコーディングを取得します。
[ public, const ]
ACharConstPtr GetEncoding(Void);

戻り値

エンコーディングが設定されていないときは null を返します。

参照

SFXXMLDocument::SetEncoding


SFXXMLDocument::GetFirstChild
最初の子ノードを取得します。
[ public, virtual, const ]
SFXXMLNodePtr GetFirstChild(Void);

戻り値

最初の子ノードを返します。子ノードがないときは null を返します。

使用例

SFXXMLDOMParser parser; // DOM パーサー
    
// DOM ツリーのルート ノードを取得する
SFXXMLDocumentPtr root = parser.GetDocument(); 

// XML 文書のルート要素(DOM ツリーのルート ノードの最初の子ノード)を取得する
SFXXMLNodePtr child = root->GetFirstChild();  

参照

SFXXMLNode::GetFirstChild | SFXXMLNode


SFXXMLDocument::GetLastChild
最後の子ノードを取得します。
[ public, virtual, const ]
SFXXMLNodePtr GetLastChild(Void);

戻り値

最後の子ノードを返します。子ノードがないときは null を返します。

参照

SFXXMLNode::GetLastChild | SFXXMLNode


SFXXMLDocument::GetListsByTypeFilter
指定したノード タイプに一致する、すべてのノードを取得します。
[ public, const ]
DOMNodeListPtr GetListsByTypeFilter(
    NodeType type   // ノード タイプ
);

戻り値

ノード タイプ(nodeType 属性)が一致する、すべてのノードを SFXXMLNode::DOMNodeList で返します。

解説

指定したノード タイプ(nodeType 属性)を持つすべてのノードを SFXXMLNode::DOMNodeList で取得します。 例えば、引数に COMMENT_NODE を指定した場合、すべての Comment ノードを返します。

タグ名を指定する場合は、SFXXMLDocument::GetElementsByTagName 関数を使用します。

使用例

// ノード タイプが "ELEMENT_NODE" である、すべてのノードを取得する
SFXXMLNode::DOMNodeListPtr list = root->GetListsByTypeFilter(ELEMENT_NODE);
if (list) {
    // 各ノードを取得する
    SFXXMLNode::DOMNodeList::Enumerator iter = list->GetFirstEnumerator();
    while (iter.HasNext()) {
        SFXXMLNodePtr child = iter.GetNext();            
        if(child->GetNodeType() == SFXXMLNode::ELEMENT_NODE);
            ...
    }
}

参照

SFXXMLNode::NodeType | SFXXMLDocument::GetElementsByTagName| SFXXMLNode | SFXXMLNode::DOMNodeList


SFXXMLDocument::GetNodeName
ノード名を取得します。
[ public, virtual, const ]
ACharConstPtr GetNodeName(Void);

戻り値

文字列 "#document" を返します。

参照

SFXXMLNode::GetNodeName| SFXXMLNode


SFXXMLDocument::GetNodeType
ノード タイプを取得します。
[ public, virtual, const ]
NodeType GetNodeType(Void);

戻り値

DOCUMENT_NODE を返します。

参照

SFXXMLNode::NodeType | SFXXMLNode::GetNodeType| SFXXMLNode


SFXXMLDocument::GetStandalone
Standalone かどうかを取得します。
[ public, const ]
Bool GetStandalone(Void);

戻り値

  • 設定されているとき : true
  • 設定されていないとき : false

参照

SFXXMLDocument::SetStandalone


SFXXMLDocument::GetVersion
バージョン番号を取得します。
[ public, const ]
ACharConstPtr GetVersion(Void);

参照

SFXXMLDocument::SetVersion


SFXXMLDocument::HasChildNodes
子ノードを持つかどうかを判定します。
[ public, virtual, const ]
Bool HasChildNodes(Void);

戻り値

  • 持つとき : true
  • 持たないとき : false

参照

SFXXMLNode::HasChildNodes| SFXXMLNode


SFXXMLDocument::InsertBefore
ノードを挿入します。
[ public, virtual ]
SFCError InsertBefore(
    SFXXMLNodeConstPtr newchild   // 挿入するノード
    SFXXMLNodeConstPtr refchild   // 参照ノード、このノードの直前に挿入される
);

戻り値

  • 成功したとき : SFERR_NO_ERROR
  • 引数が不正であるとき : SFERR_INVALID_PARAM
  • メモリ不足のとき : SFERR_NO_MEMORY
  • 失敗したとき : SFERR_FAILED

参照

SFXXMLNode::InsertBefore| SFXXMLNode


SFXXMLDocument::RemoveChild
子孫ノードも含めて子ノードを削除します。
[ public, virtual ]
SFCError RemoveChild(
    SFXXMLNodeConstPtr oldchild   // 削除する子ノード
);

戻り値

  • 成功したとき : SFERR_NO_ERROR
  • 引数が不正であるとき : SFERR_INVALID_PARAM
  • メモリ不足のとき : SFERR_NO_MEMORY
  • 失敗したとき : SFERR_FAILED

参照

SFXXMLNode::RemoveChild| SFXXMLNode


SFXXMLDocument::ReplaceChild
子ノードを置換します。
[ public, virtual ]
SFCError ReplaceChild(
    SFXXMLNodeConstPtr newchild   // 置換後ノード
    SFXXMLNodeConstPtr oldchild   // 置換前ノード
);

戻り値

  • 成功したとき : SFERR_NO_ERROR
  • 引数が不正であるとき : SFERR_INVALID_PARAM
  • メモリ不足のとき : SFERR_NO_MEMORY
  • 失敗したとき : SFERR_FAILED

参照

SFXXMLNode::ReplaceChild| SFXXMLNode


SFXXMLDocument::Save
ファイルに保存します。
[ public ]
SFCError Save(
    SFXAnsiStringConstRef output   // ファイル名
    Bool indent = true             // インデントするかどうか
);
[ public ]
SFCError Save(
    SFXPathConstRef output   // ファイルパス
    Bool indent = true       // インデントするかどうか
);
[ public ]
SFCError Save(
    SFXOutputStreamRef output   // 出力ストリーム
    Bool indent = true          // インデントするかどうか
);

戻り値

  • 成功したとき : SFERR_NO_ERROR
  • ファイルが既にオープンしているとき : SFERR_INVALID_STATE
  • パスが不正であるとき : SFERR_INVALID_PARAM
  • メモリ不足のとき : SFERR_NO_MEMORY
  • 失敗したとき : SFERR_FAILED
  • その他のエラーのとき : AEEError.h で定義されているエラー値

解説

ファイル パスはデフォルトではアプリケーションのホーム フォルダになります。


SFXXMLDocument::SetDocumentType
DocumentType ノードを設定します。
[ public ]
Void SetDocumentType(
    SFXXMLDocumentTypeConstPtr doctype   // DocumentType ノード
);

参照

SFXXMLDocument::GetDocumentType


SFXXMLDocument::SetEncoding
エンコーディングを設定します。
[ public ]
Void SetEncoding(
    SFXAnsiStringConstRef encoding   // 設定するエンコーディング
);

参照

SFXXMLDocument::GetEncoding


SFXXMLDocument::SetStandalone
Standalone かどうかを設定します。
[ public ]
Void SetStandalone(
    Bool standalone   // Standalone かどうか
);

参照

SFXXMLDocument::GetStandalone


SFXXMLDocument::SetVersion
バージョン番号を設定します。
[ public ]
Void SetVersion(
    SFXAnsiStringConstRef version   // バージョン番号
);

参照

SFXXMLDocument::GetVersion