W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2010

Re: Doubt in xmlDocDumpFormatMemoryEnc

From: Matthieu Ricaud-Dussarget <matthieu.ricaud@igs-cp.fr>
Date: Mon, 23 Aug 2010 16:19:01 +0200
Message-ID: <4C728355.5040904@igs-cp.fr>
To: bharath <bharathkr@huawei.com>
CC: 'Michael Kay' <mike@saxonica.com>, xmlschema-dev-request@w3.org, xmlschema-dev@w3.org, arathikarki@huawei.com, rajithr@huawei.com
Hi Bahrath,

As supposed Michael, I think this is not the good list for this question 
which has nothing to do with XML-Schema.
I don't know but I guess there should be a specific list on libxml, 
where you could get a precise answer.

Anyway, as far as XML is concerned  : what you are getting here ( &amp; 
&lt; &gt; ...) are XML entities which is a way to format those specials 
characters in XML.
Some of those characters (&, <) are actually forbiden in a XML file 
(they would create confusion : "<" is for opening a tag, & is for 
entities...).
I suggest you have a look on the w3c XML recommendation 
"http://www.w3.org/TR/REC-xml/#charencoding"
Any XML Tools will be aware of this and will convert back those entities 
to characters if necessary. So don't worry about that, this is actually 
normal when using XML.

Under Jedit the XML plugin propose to convert entities to characters and 
vice versa if you like.

But well, I already said to much things unrelated to schema here...

Regards,

Matthieu Ricaud-Dussarget.


Le 23/08/2010 15:01, bharath a écrit :
> Hi Michael,
> This function "xmlDocDumpFormatMemoryEnc" is in xmlsave.c of Libxml. 
> This function is used for dumping the xml file contents (pointed 
> by xmlDocPtr) to string format.
> Can you please check this and let me know about the conversion of xml 
> special characters to format as given below.
> Thanks and Regards,
> Bahrath.
> ***************************************************************************************
> This e-mail and attachments contain confidential information from 
> HUAWEI, which is intended only for the person or entity whose address 
> is listed above. Any use of the information contained herein in any 
> way (including, but not limited to, total or partial disclosure, 
> reproduction, or dissemination) by persons other than the intended 
> recipient's) is prohibited. If you receive this e-mail in error, 
> please notify the sender by phone or email immediately and delete it!
>
> ------------------------------------------------------------------------
> *From:* xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] *On Behalf Of *Michael Kay
> *Sent:* Monday, August 23, 2010 6:19 PM
> *To:* bharath
> *Cc:* xmlschema-dev-request@w3.org; xmlschema-dev@w3.org; 
> arathikarki@huawei.com; rajithr@huawei.com
> *Subject:* Re: Doubt in xmlDocDumpFormatMemoryEnc
>
> I suspect that most readers of this list, like me, have never heard of 
> *xmlDocDumpFormatMemoryEnc*(). So it would be useful for you to 
> explain what product it is part of and what its intended purpose is. 
> Does it have anything to do with XML Schema (and if not, why are you 
> posting here?)
>
> Intrinsically, escaping of XML special characters (for example 
> converting & to &amp;) is a sensible/necessary thing to do for any 
> tool that generates or serializes XML.
>
> Michael Kay
> Saxonica
>
> On 23/08/2010 13:31, bharath wrote:
>> Hi All,
>> I am calling the function *xmlDocDumpFormatMemoryEnc*() to construct 
>> xmlDocPtr to xmlChar.
>> When i used this function, the left characters are converted to right 
>> characters. Can you please let me know what is the reason to convert 
>> like this.
>> & - &amp;
>> > - &lt;
>> < - &gt;
>> " - &quot
>> ' - &#39;
>> \r - &#13;
>> Thanks and Regards,
>> Bharath.
>> ***************************************************************************************
>> This e-mail and attachments contain confidential information from 
>> HUAWEI, which is intended only for the person or entity whose address 
>> is listed above. Any use of the information contained herein in any 
>> way (including, but not limited to, total or partial disclosure, 
>> reproduction, or dissemination) by persons other than the intended 
>> recipient's) is prohibited. If you receive this e-mail in error, 
>> please notify the sender by phone or email immediately and delete it!
>


-- 
Matthieu Ricaud
IGS-CP
Service Livre numérique
Received on Monday, 23 August 2010 14:19:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:57 UTC