Подскажите, я получаю xml, в который мне нужно добавить новый элемент. Как это сделать?
Получаю это
<User xmlns="http://www.vmware.com/vcloud/v1.5" name="admin" id="urn:vcloud:user:3284020b-12b3-4e39-9096-9b7c0556f21b" href="https://example.com/api/admin/user/3284020b-12b3-4e39-9096-9b7c0556f21b" type="application/vnd.vmware.admin.user+xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://example.com/api/v1.5/schema/master.xsd">
<Link rel="edit" href="https://example.com/api/admin/user/3284020b-12b3-4e39-9096-9b7c0556f21b" type="application/vnd.vmware.admin.user+xml"/>
<Link rel="takeOwnership" href="https://example.com/api/admin/user/3284020b-12b3-4e39-9096-9b7c0556f21b/action/takeOwnership"/>
<FullName/>
<EmailAddress/>
<Telephone/>
<IsEnabled>true</IsEnabled>
<IsLocked>false</IsLocked>
<IM/>
<NameInSource>admin</NameInSource>
<IsAlertEnabled>false</IsAlertEnabled>
<IsExternal>false</IsExternal>
<ProviderType>INTEGRATED</ProviderType>
<IsDefaultCached>false</IsDefaultCached>
<IsGroupRole>false</IsGroupRole>
<StoredVmQuota>0</StoredVmQuota>
<DeployedVmQuota>0</DeployedVmQuota>
<Role href="https://example.com/api/admin/role/a08a8798-7d9b-34d6-8dad-48c7182c5f66" name="Organization Administrator" type="application/vnd.vmware.admin.role+xml"/>
<GroupReferences/>
</User>
добавить нужно
<password>123456</password>
то есть в итогк должно быть так
<User xmlns="http://www.vmware.com/vcloud/v1.5" name="admin" id="urn:vcloud:user:3284020b-12b3-4e39-9096-9b7c0556f21b" href="https://example.com/api/admin/user/3284020b-12b3-4e39-9096-9b7c0556f21b" type="application/vnd.vmware.admin.user+xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://example.com/api/v1.5/schema/master.xsd">
<Link rel="edit" href="https://example.com/api/admin/user/3284020b-12b3-4e39-9096-9b7c0556f21b" type="application/vnd.vmware.admin.user+xml"/>
<Link rel="takeOwnership" href="https://example.com/api/admin/user/3284020b-12b3-4e39-9096-9b7c0556f21b/action/takeOwnership"/>
<password>123456</password>
<FullName/>
<EmailAddress/>
<Telephone/>
<IsEnabled>true</IsEnabled>
<IsLocked>false</IsLocked>
<IM/>
<NameInSource>admin</NameInSource>
<IsAlertEnabled>false</IsAlertEnabled>
<IsExternal>false</IsExternal>
<ProviderType>INTEGRATED</ProviderType>
<IsDefaultCached>false</IsDefaultCached>
<IsGroupRole>false</IsGroupRole>
<StoredVmQuota>0</StoredVmQuota>
<DeployedVmQuota>0</DeployedVmQuota>
<Role href="https://example.com/api/admin/role/a08a8798-7d9b-34d6-8dad-48c7182c5f66" name="Organization Administrator" type="application/vnd.vmware.admin.role+xml"/>
<GroupReferences/>
</User>