*** tpb has joined #freeorion | 00:00 | |
*** bhelyer has joined #freeorion | 00:04 | |
bhelyer | Good afternoon. | 00:04 |
---|---|---|
bhelyer | GeofftheMedio: Just got an email from the XML parser guy: | 00:06 |
bhelyer | "you can always download the latest version of the XMLParser library here: http://www.applied-mathematics.net/tools/__xmlParser.zip | 00:06 |
bhelyer | If you need another license, let me know... | 00:06 |
bhelyer | (I can give you freely a BSD-style license for you and your company | 00:06 |
bhelyer | or project. Simply tell me the name of your company or project... ) | 00:06 |
bhelyer | If you like this library, please add a link from you internet site towards http://www.applied-mathematics.net/tools/xmlParser.html | 00:06 |
tpb | <http://ln-s.net/3Ei_> (at www.applied-mathematics.net) | 00:06 |
tpb | <http://ln-s.net/3EWI> (at www.applied-mathematics.net) | 00:06 |
bhelyer | Good luck with your project! | 00:06 |
bhelyer | See you! | 00:06 |
bhelyer | Frank" | 00:06 |
GeofftheMedio | hmm. well, sounds promising | 00:06 |
bhelyer | It does. | 00:07 |
bhelyer | Now we just have to figure out if it works or not. | 00:07 |
bhelyer | So if it can parse an SVG file, you reckon? | 00:08 |
GeofftheMedio | a good sign | 00:08 |
GeofftheMedio | note that we can probably make do with SVG basic or SVG tiny | 00:08 |
bhelyer | I don't know the first thing about parsing SVG. | 00:09 |
bhelyer | So the research may be a little slow. | 00:09 |
GeofftheMedio | I think the basic idea is that it's a list of shapes to draw | 00:11 |
GeofftheMedio | my idea being to parse the SVG into a suitable vector graphic data structure which knows how to render itself at any size | 00:12 |
GeofftheMedio | and also to parse the SVG for other uses... | 00:12 |
GeofftheMedio | one idea being to store freeorion galaxy maps as SVG images | 00:12 |
bhelyer | So basically I if I can 'see' all elements and nodes, and contained data? | 00:12 |
bhelyer | basically if* | 00:12 |
GeofftheMedio | I think so | 00:13 |
GeofftheMedio | there's probably a bit more to it than that, though. | 00:14 |
bhelyer | This is very nice for the simple case. | 00:26 |
bhelyer | #include <iostream> | 00:26 |
bhelyer | #include "xmlParser.h" | 00:26 |
bhelyer | int main(int argc, char** argv) | 00:26 |
bhelyer | { | 00:26 |
bhelyer | XMLNode xMainNode = XMLNode::openFileHelper("library.xml", "LIBRARY"); | 00:26 |
bhelyer | int childnodes = xMainNode.nChildNode(); | 00:26 |
bhelyer | for (int i = 0; i < childnodes; i++) { | 00:26 |
bhelyer | XMLNode xNode = xMainNode.getChildNode(i); | 00:26 |
bhelyer | std::cout << "NODE: " << xNode.getName() << std::endl; | 00:26 |
bhelyer | } | 00:26 |
bhelyer | } | 00:26 |
GeofftheMedio | no way to iterate over the child notes directly? (rather than incrementing an index variable) | 00:29 |
bhelyer | I was looking for one. | 00:30 |
bhelyer | I'm not sure. | 00:30 |
bhelyer | Looks like you can iterate over named nodes. | 00:31 |
bhelyer | But if you want to do it anonymously, the above looks to be it. | 00:32 |
GeofftheMedio | hmm | 00:36 |
bhelyer | Damn. | 00:39 |
bhelyer | Chokes on the svg root node. | 00:39 |
bhelyer | XML Parsing error inside file 'emblem02.svg'. | 00:39 |
bhelyer | Error: Unknown character entity | 00:39 |
bhelyer | At line 17, column 24. | 00:39 |
GeofftheMedio | hmm. | 00:40 |
*** bhelyer has quit IRC | 01:52 | |
kroddn | that's mostly utf8 problems | 03:56 |
kroddn | or "unicode" problems | 03:56 |
GeofftheMedio | I think that library was supposed to be able to handle unicode | 04:48 |
kroddn | yes, but maybe the svg is NOT unicode | 04:50 |
kroddn | Some lines above I read something about that unicode must be used in this lib | 04:51 |
kroddn | <bhelyer> The entire library is parametrized for the (unicode) character type. Proper | 04:51 |
kroddn | <bhelyer> unicode handling is outside the scope of this library. | 04:51 |
kroddn | So that means that svg content has to be unicode | 04:51 |
kroddn | Where did he get this emblem02.svn from? | 04:52 |
kroddn | okay, better wait for him to return ^^ | 04:53 |
*** bhelyer has joined #freeorion | 05:20 | |
GeofftheMedio | emblem02.svg was from a zip eleazar posted on the forums | 05:58 |
bhelyer | Yes. | 06:00 |
bhelyer | Why? | 06:06 |
GeofftheMedio | kroddn was asking | 06:12 |
bhelyer | Ah. | 06:20 |
kroddn | bhelyer: your problem seems so be unicode related | 06:24 |
kroddn | where can i get this zip? | 06:24 |
bhelyer | Hang on, I'll drag up the email. | 06:24 |
GeofftheMedio | I think he means the svg files, not the xml library | 06:25 |
bhelyer | Oh, that'll take more dragging. Hang on. | 06:25 |
bhelyer | kroddn: http://www.jwbjerk.com/dl/freeorion/starter-flags.zip | 06:27 |
tpb | <http://ln-s.net/3ElD> (at www.jwbjerk.com) | 06:27 |
kroddn | hm, doesnt seem to be a unicode problem | 06:34 |
kroddn | maybe you can dig into the xmllib sourcecode and extent the errormessage so that it outputs which entity causes the error | 06:36 |
bhelyer | I will, probably won't get a chance till Monday, but I will. | 06:41 |
*** mithro_ has quit IRC | 08:58 | |
*** GeofftheMedio_ has joined #freeorion | 11:10 | |
*** GeofftheMedio has quit IRC | 11:14 | |
*** GeofftheMedio_ is now known as GeofftheMedio | 11:14 | |
*** bhelyer has quit IRC | 13:46 | |
*** kroddnoMobil has joined #freeorion | 14:20 | |
*** ChanServ sets mode: +o kroddnoMobil | 14:20 | |
*** kroddnoMobil has quit IRC | 18:32 | |
*** GeofftheMedio has quit IRC | 18:42 | |
*** GeofftheMedio has joined #freeorion | 18:42 | |
*** GeofftheMedio_ has joined #freeorion | 19:31 | |
*** GeofftheMedio__ has joined #freeorion | 19:34 | |
*** GeofftheMedio___ has joined #freeorion | 19:36 | |
*** GeofftheMedio has quit IRC | 19:49 | |
*** GeofftheMedio_ has quit IRC | 19:52 | |
*** GeofftheMedio__ has quit IRC | 19:55 | |
*** GeofftheMedio has joined #freeorion | 20:13 | |
*** mithro_ has joined #freeorion | 20:31 | |
*** GeofftheMedio___ has quit IRC | 20:32 | |
*** STalKer-X has joined #freeorion | 23:41 | |
*** STalKer-Y has quit IRC | 23:46 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!