[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[xml] How to use xmlC14NExecute



Dear all,

I'm a beginner of using libXML2 and C14N functions.

I have encountered the save problem to canonicalize a part of my xml like
following.

Mr. Aleksey has mentioned the use of xmlC14NExecute, but I still couldn't
figure out what data should I assign for void * user_data actually.

Could you please give me plain instruction ?

Best regards,
Tatsuya Tsurukawa

>> So I built a node set, consisting of my single element node.
>> Should I build a node set including all sub-nodes? 

> Yes. You have to add all the nodes that you want to get
> canonicalized. However, in this particular case there is
> a better way. The xmlC14NExecute function allows one to
> provide a callback that would be called to determine if
> a given node is "visible" (i.e. included in c14n output)
> or not. To canonicalize just a given node (with all the
> attributes and children nodes) you can write a callback
> function that would return "true" for your node, its attributes,
> namespaces and children nodes and "false" for all other
> nodes in the document.

>Aleksey

--------
Tsurukawa Tatsuya cj MitsubishiElectric co jp



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]