私は石鹸メッセージを書き込もうとしています:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
XOMを使用します。
を使用して要素を作成しています
Element soap = new Element("soap:Envelope", "http://schemas.xmlsoap.org/soap/envelope/");
しかし、xmlns:xsi および xmln:xsd 属性を追加する方法がわかりません。使用する
Attribute xsi = new Attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
次のエラーを返します
Attribute objects are not used to represent namespace declarations
では、これらの属性を追加するにはどうすればよいでしょうか?
ありがとう