Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Arturo2706
Posts: 37
Registered: ‎09-15-2010
My Device: 9800

Send XML Post

 

 

Some example to send xml to a server by Post ?

thanks

Developer
RileyGB
Posts: 284
Registered: ‎08-06-2010
My Device: Z10

Re: Send XML Post

[ Edited ]

You can review my post here http://supportforums.blackberry.com/t5/Cascades-Development/Sending-data-via-HTTP-post/m-p/2008535#M... where you'd make the QByteArray an xml string.

 

You should be able to use QXmlSerializer to build your XML string: http://doc.qt.digia.com/qt/qxmlserializer.html



Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Contributor
Arturo2706
Posts: 37
Registered: ‎09-15-2010
My Device: 9800

Re: Send XML Post

First thanks for answer, and wanted to ask in your post, where you add the xml file?

Thank in thanks in advance

Arturo

Developer
RileyGB
Posts: 284
Registered: ‎08-06-2010
My Device: Z10

Re: Send XML Post

In the line 

 

byteArrayObject.append("name1=value1");

 You can put your xml in place of name1=value1. If you're retrieving XML from a file, you'll need to get it into a string format.

 

Please note the correction that I just posted in that thread as well.



Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples