Hi Fernand,
Everything works fine except for the fact that all the nodes « this
/this »
(that is, a space (an XML text node whose contents are a single space
character)
within a this element node) get transformed to a « this/ » element
I can't really reproduce this:
A simple ghci session
I can't really reproduce this:
A simple ghci session gives the following:
---
[EMAIL PROTECTED]:~/haskell/hxt/curr/examples/arrows/HelloWorld ghci
HelloWorld.hs
GHCi, version 6.8.1: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking
Hi Miguel,
Hmmm, with 'readString ... this /this' everything works fine,
but with 'readString ... itemsthis /this/items' it doesn't.
Seems to be a bug in HXT.
I don't see the bug:
--
*Main runX $ ( readString [(a_validate,v_0)] itemsthis /this/items
Prelude Text.XML.HXT.Arrow runX $ ( readString [(a_validate,v_0)]
xy /y/x setTraceLevel 4 traceDoc doc after reading
s
etTraceLevel 0 writeDocumentToString [(a_indent, v_1)])
-- (1) doc after reading
x
y/
/x
content of: xy /y/x
=
---XTag /
| source=\xy
Hi Miguel,
Try xy /y/x and a_indent writing option.
yes, with the indent option set, whitespace
becomes insignificant and will change during
formating, and so the contents
of the inner element reduces to empty
Turn of the indentation and you get the
result you want.
Cheers,
Uwe
--
Web:
Hi,
I'm using HXT (7.4) with GHC to make some XML transformations (BTW,
congratulations to the maintainers of that package for their impressive
work).
Everything works fine except for the fact that all the nodes « this
/this »
(that is, a space (an XML text node whose contents are a single
Miguel Mitrofanov a écrit :
Seems rather strange for me, I've just installed HXT and got this:
Prelude Text.XML.HXT.Arrow runX $ readString [(a_validate,0)] this /this
writeDocumentToString []
[?xml version=\1.0\ encoding=\UTF-8\?\nthis /this]
Everything works fine except for the fact
Hmmm, with 'readString ... this /this' everything works fine,
but with 'readString ... itemsthis /this/items' it doesn't.
Seems to be a bug in HXT.
But if I try the same with my XML file, my empty nodes are
folded. I suppose this comes from the Ctrl-M at the end of the
lines.
See the