例1 - データ操作の木構造を作成するサンプルコード
フラグ名"サンプルフラグ"をオン状態にする :
public GElement getDataOperation(){
Document doc = (Document)Class.forName("com.ibm.xml.parser.TXDocument").newInstance(); //@xml4j
Element root = doc.createElement("dataOperation"); //@ノード名
Element item = doc.createElement("flagOperation"); //@ノード名
item.setAttribute("name","サンプルフラグ");
item.setAttribute("switch","on");
root.appendChild(item);
return new GElement( (Node)root) );
}
例2 - データ操作が不要な場合のサンプルコード
public GElement getDataOperation(){
return null;
}
|