Re: [xml] How to use c14n features?

2016-03-30 Thread Tae-In Kim
Hi,

Sorry, I looked over the result of xmllint.exe. For example it has been
changed like
fromhttp://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
tohttp://www.w3.org/TR/2001/REC-xml-c14n-20010315;>

I think it's been canonicalized. Thanks.

2016년 3월 30일 (수) 오후 4:43, Tae-In Kim 님이 작성:

> Hi,
>
> Thank you for your reply and sorry for my late mail.
>
> I've executed xmllint with my xml file, but the result of --c14n was
> nearly same with original xml content. --c14n just removed following text:
> `
> 
> `
> To say my situation accurately, I want to tell that my xml document is
> SOAP document and every node has namespace like "SOAP" or "ds" or else...
> Do I need to do something more to do c14n?
>
> Thank you.
>
> 2016년 3월 16일 (수) 오후 5:01, Daniel Veillard 님이 작성:
>
>> On Tue, Mar 15, 2016 at 05:06:13AM +, Tae-In Kim wrote:
>> > Hi,
>> >
>> > I'm in first use of libxml2 and want to use c14n features in "c14n.h". I
>> > tried to find some references to use them but couldn't make it.
>> > Can you please tell me where to get it or help me to use it?
>>
>>   Look at the code for xmllint.c in the source and around line 2573
>> for one way to save. If xmllint --c14n does what you want you can just
>> copy the code
>>
>> Daniel
>>
>> --
>> Daniel Veillard  | Open Source and Standards, Red Hat
>> veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
>> http://veillard.com/ | virtualization library  http://libvirt.org/
>>
>
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] How to use c14n features?

2016-03-30 Thread Tae-In Kim
Hi,

Thank you for your reply and sorry for my late mail.

I've executed xmllint with my xml file, but the result of --c14n was nearly
same with original xml content. --c14n just removed following text:
`

`
To say my situation accurately, I want to tell that my xml document is SOAP
document and every node has namespace like "SOAP" or "ds" or else...
Do I need to do something more to do c14n?

Thank you.

2016년 3월 16일 (수) 오후 5:01, Daniel Veillard 님이 작성:

> On Tue, Mar 15, 2016 at 05:06:13AM +, Tae-In Kim wrote:
> > Hi,
> >
> > I'm in first use of libxml2 and want to use c14n features in "c14n.h". I
> > tried to find some references to use them but couldn't make it.
> > Can you please tell me where to get it or help me to use it?
>
>   Look at the code for xmllint.c in the source and around line 2573
> for one way to save. If xmllint --c14n does what you want you can just
> copy the code
>
> Daniel
>
> --
> Daniel Veillard  | Open Source and Standards, Red Hat
> veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> http://veillard.com/ | virtualization library  http://libvirt.org/
>
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] How to use c14n features?

2016-03-16 Thread Daniel Veillard
On Tue, Mar 15, 2016 at 05:06:13AM +, Tae-In Kim wrote:
> Hi,
> 
> I'm in first use of libxml2 and want to use c14n features in "c14n.h". I
> tried to find some references to use them but couldn't make it.
> Can you please tell me where to get it or help me to use it?

  Look at the code for xmllint.c in the source and around line 2573
for one way to save. If xmllint --c14n does what you want you can just
copy the code

Daniel

-- 
Daniel Veillard  | Open Source and Standards, Red Hat
veill...@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] How to use c14n features?

2016-03-14 Thread Tae-In Kim
Hi,

I'm in first use of libxml2 and want to use c14n features in "c14n.h". I
tried to find some references to use them but couldn't make it.
Can you please tell me where to get it or help me to use it?

With my poor inspection, it seems that `xmlC14NExecute()` is actually in
charge of c14n but I don't know how to properly create
`xmlC14NIsVisibleCallback`. I created the callback which always return true
like following:

`
auto doc = xmlParseFile(R"(C:\BIN\temp\xml\SOAP\Soap.xml)");
auto node = xmlDocGetRootElement(doc);
xmlBufferPtr buffer = xmlBufferCreate();
xmlOutputBufferPtr outbuf = (xmlOutputBufferPtr)
xmlMalloc(sizeof(xmlOutputBuffer));

xmlC14NIsVisibleCallback callback = [](void * userdata, xmlNodePtr node,
xmlNodePtr parent)->int { return true; };
xmlC14NExecute(doc, callback, node, 0, nullptr, true, outbuf);
`
After calling xmlC14NExecute, the exception pops and the program crashed
and it seems to be out of access violation.

Please forgive my ignorance of basic usage of libxml2, but it would be so
grateful if you help me to make this out.
Thanks.
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml