www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Any full feature xml library available?

reply Domain <dont_email empty.com> writes:
I need a xml library which support document entity or xinclude.
The xml may like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc [
     <!ENTITY data SYSTEM "data.xml">
]>
<root xmlns:xi="http://www.w3.org/2001/XInclude">
     &data;
     <xi:include href="table.xml"/>
</root>
May 01 2019
parent reply bachmeier <no spam.net> writes:
On Wednesday, 1 May 2019 at 13:54:08 UTC, Domain wrote:
 I need a xml library which support document entity or xinclude.
 The xml may like this:


 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE doc [
     <!ENTITY data SYSTEM "data.xml">
 ]>
 <root xmlns:xi="http://www.w3.org/2001/XInclude">
     &data;
     <xi:include href="table.xml"/>
 </root>
Have you looked at this? https://github.com/jmdavis/dxml
May 01 2019
parent reply Domain <dont_email empty.com> writes:
On Wednesday, 1 May 2019 at 13:57:04 UTC, bachmeier wrote:
 On Wednesday, 1 May 2019 at 13:54:08 UTC, Domain wrote:
 I need a xml library which support document entity or xinclude.
 The xml may like this:


 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE doc [
     <!ENTITY data SYSTEM "data.xml">
 ]>
 <root xmlns:xi="http://www.w3.org/2001/XInclude">
     &data;
     <xi:include href="table.xml"/>
 </root>
Have you looked at this? https://github.com/jmdavis/dxml
Yes, but I don't think dxml support these features.
May 01 2019
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 02/05/2019 2:04 AM, Domain wrote:
 On Wednesday, 1 May 2019 at 13:57:04 UTC, bachmeier wrote:
 On Wednesday, 1 May 2019 at 13:54:08 UTC, Domain wrote:
 I need a xml library which support document entity or xinclude.
 The xml may like this:


 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE doc [
     <!ENTITY data SYSTEM "data.xml">
 ]>
 <root xmlns:xi="http://www.w3.org/2001/XInclude">
     &data;
     <xi:include href="table.xml"/>
 </root>
Have you looked at this? https://github.com/jmdavis/dxml
Yes, but I don't think dxml support these features.
It does not. Those features come under the big bad guys feature list. Gonna have to go to C for it.
May 01 2019
parent reply Russel Winder <russel winder.org.uk> writes:
On Thu, 2019-05-02 at 02:11 +1200, rikki cattermole via Digitalmars-d-
learn wrote:
[=E2=80=A6]
=20
 It does not. Those features come under the big bad guys feature list.
=20
 Gonna have to go to C for it.
Surely that means you can use Python, Rust, C++, or D rather than having to descend to using C? libxml2 is definitely usable from Python, it must be usable from D. Of course, I am assuming libxml2 has the facilities required. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
May 02 2019
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 03/05/2019 3:36 AM, Russel Winder wrote:
 On Thu, 2019-05-02 at 02:11 +1200, rikki cattermole via Digitalmars-d-
 learn wrote:
 […]
 It does not. Those features come under the big bad guys feature list.

 Gonna have to go to C for it.
Surely that means you can use Python, Rust, C++, or D rather than having to descend to using C? libxml2 is definitely usable from Python, it must be usable from D. Of course, I am assuming libxml2 has the facilities required.
libxml2 is precisely what I meant. We just don't have the libraries written in D at this point.
May 02 2019
next sibling parent reply Russel Winder <russel winder.org.uk> writes:
On Fri, 2019-05-03 at 03:50 +1200, rikki cattermole via Digitalmars-d-
learn wrote:
 On 03/05/2019 3:36 AM, Russel Winder wrote:
=20
[=E2=80=A6]
 libxml2 is definitely usable from Python, it must be usable from D.
 Of
 course, I am assuming libxml2 has the facilities required.
=20 libxml2 is precisely what I meant. =20 We just don't have the libraries written in D at this point.
There are situations where you create a binding in preference to writing something from scratch. cf. gtk, gstreamer, etc. so why not libxml2? --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
May 02 2019
parent rikki cattermole <rikki cattermole.co.nz> writes:
On 03/05/2019 4:23 AM, Russel Winder wrote:
 On Fri, 2019-05-03 at 03:50 +1200, rikki cattermole via Digitalmars-d-
 learn wrote:
 On 03/05/2019 3:36 AM, Russel Winder wrote:

[…]
 libxml2 is definitely usable from Python, it must be usable from D.
 Of
 course, I am assuming libxml2 has the facilities required.
libxml2 is precisely what I meant. We just don't have the libraries written in D at this point.
There are situations where you create a binding in preference to writing something from scratch. cf. gtk, gstreamer, etc. so why not libxml2?
I am suggesting a binding. I think we have our wires crossed on this.
May 02 2019
prev sibling next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Thu, May 02, 2019 at 05:23:29PM +0100, Russel Winder via Digitalmars-d-learn
wrote:
[...]
 There are situations where you create a binding in preference to
 writing something from scratch. cf. gtk, gstreamer, etc. so why not
 libxml2?
[...] No particular reason, except nobody has taken up the task yet. Would you? T -- Once bitten, twice cry...
May 02 2019
prev sibling next sibling parent Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Thursday, 2 May 2019 at 15:50:53 UTC, rikki cattermole wrote:
 On 03/05/2019 3:36 AM, Russel Winder wrote:
 On Thu, 2019-05-02 at 02:11 +1200, rikki cattermole via 
 Digitalmars-d-
 learn wrote:
 […]
 It does not. Those features come under the big bad guys 
 feature list.

 Gonna have to go to C for it.
Surely that means you can use Python, Rust, C++, or D rather than having to descend to using C? libxml2 is definitely usable from Python, it must be usable from D. Of course, I am assuming libxml2 has the facilities required.
libxml2 is precisely what I meant. We just don't have the libraries written in D at this point.
Apparently, bindings to libxml2 existed back in 2008. http://www.dsource.org/projects/bcd/ Bastiaan
May 02 2019
prev sibling next sibling parent Russel Winder <russel winder.org.uk> writes:
On Thu, 2019-05-02 at 09:28 -0700, H. S. Teoh via Digitalmars-d-learn
wrote:
 On Thu, May 02, 2019 at 05:23:29PM +0100, Russel Winder via
 Digitalmars-d-learn wrote:
 [...]
 There are situations where you create a binding in preference to
 writing something from scratch. cf. gtk, gstreamer, etc. so why not
 libxml2?
[...] =20 No particular reason, except nobody has taken up the task yet. Would you?
If I were interested in XML processing yes I would. However, just at the moment I am doing things with MPEG-TS and gstreamer-rs. I may investigate the analogue for GstreamerD. On the other hand there are enough people moaning about std.xml and the general lack of quality, high performance D support for XML that there is clearly a lot of people who should be interested in creating a D binding to libxml2. =20 --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
May 03 2019
prev sibling next sibling parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Fri, May 03, 2019 at 09:56:56PM +0100, Russel Winder via Digitalmars-d-learn
wrote:
 On Thu, 2019-05-02 at 09:28 -0700, H. S. Teoh via Digitalmars-d-learn
 wrote:
 On Thu, May 02, 2019 at 05:23:29PM +0100, Russel Winder via
 Digitalmars-d-learn wrote:
 [...]
 There are situations where you create a binding in preference to
 writing something from scratch. cf. gtk, gstreamer, etc. so why
 not libxml2?
[...] No particular reason, except nobody has taken up the task yet. Would you?
If I were interested in XML processing yes I would. However, just at the moment I am doing things with MPEG-TS and gstreamer-rs. I may investigate the analogue for GstreamerD. On the other hand there are enough people moaning about std.xml and the general lack of quality, high performance D support for XML that there is clearly a lot of people who should be interested in creating a D binding to libxml2.
[...] The problem is that while there is no shortage of complaints about XML support in D, there is a great dearth of people actually willing to *do* something about it. At least Jonathan wrote dxml, which arguably would meet the need in most cases. So there's that. But if somebody wants entity references and other similar things, the only recourse would appear to be to wrap libxml2. Given D's aptitude at interfacing with C, this should be much simpler than writing dxml. It just needs someone to sit down and *do* it. T -- Questions are the beginning of intelligence, but the fear of God is the beginning of wisdom.
May 03 2019
parent Domain <dont_email empty.com> writes:
On Friday, 3 May 2019 at 21:07:29 UTC, H. S. Teoh wrote:
 On Fri, May 03, 2019 at 09:56:56PM +0100, Russel Winder via 
 Digitalmars-d-learn wrote:
 On Thu, 2019-05-02 at 09:28 -0700, H. S. Teoh via 
 Digitalmars-d-learn wrote:
 On Thu, May 02, 2019 at 05:23:29PM +0100, Russel Winder via
 Digitalmars-d-learn wrote:
 [...]
 [...]
[...] No particular reason, except nobody has taken up the task yet. Would you?
If I were interested in XML processing yes I would. However, just at the moment I am doing things with MPEG-TS and gstreamer-rs. I may investigate the analogue for GstreamerD. On the other hand there are enough people moaning about std.xml and the general lack of quality, high performance D support for XML that there is clearly a lot of people who should be interested in creating a D binding to libxml2.
[...] The problem is that while there is no shortage of complaints about XML support in D, there is a great dearth of people actually willing to *do* something about it. At least Jonathan wrote dxml, which arguably would meet the need in most cases. So there's that. But if somebody wants entity references and other similar things, the only recourse would appear to be to wrap libxml2. Given D's aptitude at interfacing with C, this should be much simpler than writing dxml. It just needs someone to sit down and *do* it. T
I am trying to port libxml++ to D. I use dstep to generate the binding to libxml2, and then porting c++ to D. But I don't have much time, and there are some failures with dstep. I don't have a computer at home, so I must use termux to coding. I hope someone can continue to maintaining the android port of ldc.
May 03 2019
prev sibling parent Russel Winder <russel winder.org.uk> writes:
On Fri, 2019-05-03 at 14:07 -0700, H. S. Teoh via Digitalmars-d-learn wrote=
:
=20
[=E2=80=A6]
 The problem is that while there is no shortage of complaints about XML
 support in D, there is a great dearth of people actually willing to *do*
 something about it.
In my case it is because I have no need to deal with XML using D, and I am = not in the market for paid work. Those actually doing stuff with XML and D have far fewer excuses.
 At least Jonathan wrote dxml, which arguably would meet the need in most
 cases.  So there's that.  But if somebody wants entity references and
 other similar things, the only recourse would appear to be to wrap
 libxml2.  Given D's aptitude at interfacing with C, this should be much
 simpler than writing dxml.  It just needs someone to sit down and *do*
 it.
That people who have the problem can write many lengthy emails on the D lis= ts rather than doing something about creating a D binding to libxml2 is clearl= y the bulk of the problem. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
May 05 2019