- <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
- <soap:Header>
- <context xmlns="urn:zimbra">
- <change token="20333"/>
- </context>
- </soap:Header>
- <soap:Body>
- <CreateAccountResponse xmlns="urn:zimbraAdmin">
- <account id="83ebf344-dc51-47ae-9a36-3eb24281d53e" name="iamtesting@example.com">
- <a n="zimbraId">83ebf344-dc51-47ae-9a36-3eb24281d53e</a>
- <a n="zimbraMailDeliveryAddress">iamtesting@example.com</a>
- </account>
- </CreateAccountResponse>
- </soap:Body>
- </soap:Envelope>
- $xml = new SimpleXMLElement($data);
- $xml->registerXPathNamespace('soap', 'http://www.w3.org/2003/05/soap-envelope');
- $body = $xml->xpath('//soap:Body');
- $CreateAccountResponse = $xml->xpath('//soap:Body/CreateAccountResponse');
- $CreateAccountResponse = $body[0]->CreateAccountResponse;
- $zimbraId = $CreateAccountResponse->account->xpath('a[@n=zimbraId]');
- $zimbraId = strstr($data, "<a n="zimbraId"");
- $zimbraId = strstr($zimbraId, ">");
- $zimbraId = substr($zimbraId, 1, strpos($zimbraId, "<") - 1);
- <CreateAccountResponse xmlns="urn:zimbraAdmin">
- $xml->registerXPathNamespace('soap', 'http://www.w3.org/2003/05/soap-envelope');
- $xml->registerXPathNamespace('zimbra', 'urn:zimbraAdmin');
- $CreateAccountResponse = $xml->xpath('//soap:Body/zimbra:CreateAccountResponse');
Tuesday, 31 July 2012
Parsing Zimbra SOAP response with SimpleXML and xpath
Subscribe to:
Post Comments (Atom)
Popular Posts
-
File name: Ashli Orion and Georgia Jones part2.wmv Size: 188.90 MB Type: .wmv Source: http://w...
-
import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JF...
-
Warning: This story contains fluffies, violence and human tragedy. Viewer discretion is advised. I don't even like c...
-
CheckBox chb = new CheckBox(); chb.InputAttributes.Add("value", "my_id_00"); chb.Text = "Title 00"; ...
-
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Point; import ja...
-
HttpClient client = new DefaultHttpClient(); HttpPost httpPost = new HttpPost("http://simonexxx.no-ip.info/ilMercatinoDelxxx/Mod...
-
http://ul.to/so1xzfnd/Various Artists - Who Owns the Game? [iTunes Plus AAC M4A].rar http://imgchili.com/show/13303/13303501_who...
-
// the lines from which will be read $lines = "1 5 16 26"; // split these numbers above into an array $lines...
-
"30 Meters " + raw("²") def area_conversion(feet, project) if project.metric ...
-
private void Save_Click(object sender, EventArgs e) { string filePath = txtFilePath.Text; if (!Fi...
No comments:
Post a Comment