XML functions?
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm
Re: XML functions?
There's wx/xml/xml.h or expat that comes with wxwidgets, or there's a project at http://xml4wxwindows.sourceforge.net/.eros wrote:Is there any functions to read XML or we have to do it ourselfs?
[Mostly retired moderator, still check in to clean up some stuff]
-
- Knows some wx things
- Posts: 31
- Joined: Fri Sep 10, 2004 1:03 pm
- Location: Troy, NY
- Contact:
Re: XML functions?
xml4wxwindows hasn't been updated in a while I don't think.Ryan Norton wrote:There's wx/xml/xml.h or expat that comes with wxwidgets, or there's a project at http://xml4wxwindows.sourceforge.net/.
If wx/xml/xml.h doesn't fit your needs, I'd recommend http://www.grinninglizard.com/tinyxml/ instead. I've also been a big Xerces/Xalan user, but unless you really need XSLT, it probably isn't worth the effort and application size that they bring.
Cheers.
Casey
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm
Re: XML functions?
Casey - wasn't there a wxwidgets wrapper around libxml posted a while back?caseyodonnell wrote:xml4wxwindows hasn't been updated in a while I don't think.Ryan Norton wrote:There's wx/xml/xml.h or expat that comes with wxwidgets, or there's a project at http://xml4wxwindows.sourceforge.net/.
If wx/xml/xml.h doesn't fit your needs, I'd recommend http://www.grinninglizard.com/tinyxml/ instead. I've also been a big Xerces/Xalan user, but unless you really need XSLT, it probably isn't worth the effort and application size that they bring.
Cheers.
Casey
[Mostly retired moderator, still check in to clean up some stuff]
-
- Knows some wx things
- Posts: 31
- Joined: Fri Sep 10, 2004 1:03 pm
- Location: Troy, NY
- Contact:
Re: XML functions?
There is http://pmade.org/software/xmlwrapp/ but that doesn't seem to be wxWidgets specific. I've seen mention of wxmlccwrap, on the list archive, but don't know what it is, and Google doesn't tell me anything.Ryan Norton wrote: Casey - wasn't there a wxwidgets wrapper around libxml posted a while back?
So, I suspect there might be, but I'm not finding it.
I have found the best XML library so far is TinyXML:
http://tinyxml.sourceforge.net/
Well, best for my needs!
CG
http://tinyxml.sourceforge.net/
Well, best for my needs!
CG
You could take a look at how xmule parses xml files from the DynamicPreferences class...Just remember that it is licensed under a US copyright in that you can only use no more than 10% and must directly reference if you choose to make code based off what you see in there (which is only fair).
http://cvs.sourceforge.net/viewcvs.py/x ... &view=auto
Look specifically in DynamicPreferencesCtrl::DynamicPreferencesCtrl()
http://cvs.sourceforge.net/viewcvs.py/x ... &view=auto
Look specifically in DynamicPreferencesCtrl::DynamicPreferencesCtrl()
Hi!
We saw some documentation for the built-in XML functionality that said "do not use yet". Perhaps that warning is deprecated?
We need only simple XML-functions; tags with and without values, and that's it. Will wx/xml/xml.h be suitable for this?
What do you reckon would be the easiest and best XML parser to use for these purposes?
We saw some documentation for the built-in XML functionality that said "do not use yet". Perhaps that warning is deprecated?
We need only simple XML-functions; tags with and without values, and that's it. Will wx/xml/xml.h be suitable for this?
What do you reckon would be the easiest and best XML parser to use for these purposes?
Regards,
/Joakim
/Joakim
-
- I live to help wx-kind
- Posts: 194
- Joined: Mon Aug 30, 2004 1:26 pm
- Location: PA, USA
- Contact:
It's a two-fold issue.jokke wrote:Hi!
We saw some documentation for the built-in XML functionality that said "do not use yet". Perhaps that warning is deprecated?
We need only simple XML-functions; tags with and without values, and that's it. Will wx/xml/xml.h be suitable for this?
One, the wxXmlDocument stuff is there, and people do use it. I suspect (and will push for) it to remain available for a long time. Of course, I'm not one of the developers, so my request might be cast aside for other reasons.
Two, the wxXmlDocument is a simple XML parser. I've used it before to parse a simple XML document, and the functionality really ends there - parsing simple XML. If you need to apply XSLTs, or other "advanced" XML features, you have to look somewhere else.
There has been passing talk on the mailing list about needing a New And Better XML implementation, but (seemingly) nobody has stepped up to the plate yet. This could mean that everybody is already using some library like TinyXML and throwing it into wxWidgets structures, or maybe people are using the standard library with these other APIs (and they don't need to do interface that part of there app with wxWidgets). I don't know.
For my purposes (parsing a relatively simple XML document) wxXmlDocumentworked fine.
There was also a question about XML-Libs in the Mailinglist.
Francesco Montorsi anwered :
---------8<-------------------------------
Hi,
if you want to do good XML parsing/editing/load&save with wxWidgets,
I suggest you to use wxWidgets+libxml2, maybe using the wrappers
I've created for libxml2 (they're called wxxml2; you'll find them at
http://wxcode.sourceforge.net)
[...]
FM
--------->8-------------------------------
Gordon
Francesco Montorsi anwered :
---------8<-------------------------------
Hi,
if you want to do good XML parsing/editing/load&save with wxWidgets,
I suggest you to use wxWidgets+libxml2, maybe using the wrappers
I've created for libxml2 (they're called wxxml2; you'll find them at
http://wxcode.sourceforge.net)
[...]
FM
--------->8-------------------------------
Gordon