[Axl] Auto-discard notification
maikwo at googlemail.com
Tue Jun 16 09:55:25 CEST 2009
Francis Brosnan Blazquez schrieb:
> Hi Maik,
>> I have a short question about storing raw binary data inside
>> the xml.
>> 1. does the axl api support something like a pointer and a
>> size for the
>> value ?
> It depends on how you want to store such content. It may require from
> you to do some marshalling/unmarshalling to properly store the content
> and the size associated.
> Maybe you can provide more details about the operation you have in mind
> so I can be more specific.
I want to implement a function storing strings as well as binary data.
I'd like to handle strings
as binary data to avoid parsing problems. Maybe in the future I'd like
to store unicode strings as well without
changing the encoding of the xml. In other words the xml should not care
about what is stored in the node.
I'm using raw and base64 encoding for that kind of data. In case of
base64 encoding, I can store whatever
I like without any problems, but in case of raw data I can get into
trouble with strings contaning special characters.
>> 2. does axl support CDATA sections ?
> Sure. CDATA support is provided using:
> - axl_node_set_cdata_content
> In fact CDATA support provided by axl can hold any binary data including
> CDATA termination ]]> which is detected and properly escaped before
> placing the content into the node.
> In the other hand, axl properly unmarshalls CDATA content having in mind
> this support when you call to axl_node_get_content.
> Let me know if this solves your problem Maik. Cheers!
I guess that solves my problem.
More information about the Axl