Re: [xml] encoding problem



Le 28/03/01 08:57:46, Bernard Valton a écrit :
I've got a xml document containing :

  <setvar value="&#38;!=x1A9F9A"/>

after parsing, I get a tree like this :

 element : name = setvar
   attr : name = value
   children : name = #38
                 content = NULL

Maybe it's correct, I don't know ??

I would like to get :

 element : name = setvar
   attr : name = value
   children : name = text
                 content = &#38;!=x1A9F9A

Is it a bug or the result of encoding ?
Is there a solution ?

ptittom:~$ echo '<setvar value="&#38;!=x1A9F9A"/>' |xmllint --debug -
DOCUMENT
version=1.0
URL=-
standalone=true
  ELEMENT setvar
    ATTRIBUTE value
      ENTITY_REF(#38)
      TEXT
        content=!=x1A9F9A
ptittom:~$ echo '<setvar value="&#38;!=x1A9F9A"/>' |xmllint --debug --noent
-
DOCUMENT
version=1.0
URL=-
standalone=true
  ELEMENT setvar
    ATTRIBUTE value
      TEXT
        content=&#38;!=x1A9F9A

Which version of libxml do you have ?

Tom.




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