> Tommi Mäkitalo <[email protected]> hat am 28. Mai 2014 um 22:57 geschrieben:
[...]
> Te get rid of "category=..." and "type=..." you can reset a flag:
>
> cxxtools::xml::XmlSerializer serializer(std::cout);
> serializer.useAttributes(false);
> serializer.serialize(msg, "AMessage");
> serializer.finish();
>
> There are also flags for disabling the xml declaration header
> (useXmlDeclaration), indentation (useIndent) and line feeds (useEndl).
>
> Note that if you want to disable the xml declaration, it needs to be
> done before the xml declaration is sent to the out stream, which happens
> as soon as the out stream is set. You have to use the method "attach"
> instead of the constructor to set it after setting the proper attribute:
>
> cxxtools::xml::XmlSerializer serializer
> serializer.useXmlDeclaration(false);
> serializer.attach(std::cout);
It would be good if we have doxygen commant about this function:
http://www.tntnet.org/apidoc/html/classcxxtools_1_1xml_1_1_xml_serializer.html
Olaf
BEGIN:VCARD
VERSION:3.0
PRODID:OPEN-XCHANGE
FN:Olaf Radicke
N:Radicke;Olaf;;;
X-OPEN-XCHANGE-CTYPE:contact
EMAIL;TYPE=INTERNET,work:[email protected]
REV:20110624T183100.487Z
UID:7212a92f-8ba2-42d1-adab-d30467194232
END:VCARD
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general