Ok, I think my version of tinyXml is bad or something, because I’m running the dump_to_stdout function that comes with the tutorial in the documentation. It’s supposed to be a cut and past function but my results are coming out totally different then the results posted in the tutorial. The “Elements” part specifically are outputting weird.
I’m using version 2.5.3 of tinyxml and I’m on a Mac using xcode. I added all the tinyxml source files according to the readme to my project and it compiles fine, but I’m having trouble even with the tutorials and copying and pasting the function, to get the same results as in the tutorial. Does anyone know why tinyxml hates me?
Here’s the xml code form the tutorial:
<?xml version="1.0" ?><MyApp> <!-- Settings for MyApp --> <Messages> <Welcome>Welcome to MyApp</Welcome> <Farewell>Thank you for using MyApp</Farewell> </Messages> <Windows> <Window name="MainFrame" x="5" y="15" w="400" h="250" /> </Windows> <Connection ip="192.168.0.1" timeout="123.456000" /></MyApp>
Here’s the output generated with the dump_to_stdout function shown in the documentation.
Document+ Declaration+ Element [MyApp] (No attributes) + Comment: [ Settings for MyApp ] + Element [Messages] (No attributes) + Element [Welcome] (No attributes) + Text: [Welcome to MyApp] + Element [Farewell] (No attributes) + Text: [Thank you for using MyApp] + Element [Windows] (No attributes) + Element [Window] + name: value=[MainFrame] + x: value=[5] int=5 d=5.0 + y: value=[15] int=15 d=15.0 + w: value=[400] int=400 d=400.0 + h: value=[250] int=250 d=250.0 5 attributes + Element [Connection] + ip: value=[192.168.0.1] int=192 d=192.2 + timeout: value=[123.456000] int=123 d=123.5 2 attributes
My output, when I copy and pasted the function and tried to run it (it’s meant to be copy and pasted btw) is different. It’s about 6 pages longer (I only posted a page just to give you the idea) and the values are different compared to the original output in the tutorial shown above. But why is it different? It should be the same since it’s the same function! Does anyone know why tinyXml hates me?
Document+ Declaration+ Unknown+ Element [w:wordDocument] + xmlns:w: value=[http://schemas.microsoft.com/office/word/2003/wordml] + xmlns:v: value=[urn:schemas-microsoft-com:vml] + xmlns:w10: value=[urn:schemas-microsoft-com:office:word] + xmlns:sl: value=[http://schemas.microsoft.com/schemaLibrary/2003/core] + xmlns:aml: value=[http://schemas.microsoft.com/aml/2001/core] + xmlns:wx: value=[http://schemas.microsoft.com/office/word/2003/auxHint] + xmlns:o: value=[urn:schemas-microsoft-com:office:office] + xmlns:dt: value=[uuid:C2F41010-65B3-11d1-A29F-00AA00C14882] + w:macrosPresent: value=[no] + w:embeddedObjPresent: value=[no] + w:ocxPresent: value=[no] + xml:space: value=[preserve] 12 attributes + Element [o:DocumentProperties] (No attributes) + Element [w:fonts] (No attributes) + Element [w:defaultFonts] + w:ascii: value=[Times New Roman] + w:fareast: value=[Times New Roman] + w:h-ansi: value=[Times New Roman] + w:cs: value=[Times New Roman] 4 attributes + Element [w:docPr] (No attributes) + Text: [w:defaultTabStop w:val="720"/>] + Element [w:body] (No attributes) + Element [wx:sect] (No attributes)