DerekJ Posted January 11, 2013 Posted January 11, 2013 Hi All, Anyone here know about programming and reading XML files? Do the terms Node and Element make sence to you? If so please help me before I ram this keyboard through my screen :-( DerekJ Quote
Mike H Posted January 11, 2013 Posted January 11, 2013 LOL, an element contains text or other elements. A node is just the term for the building blocks in your xml doc. It's not that obvious as a node can be an element. Why are you bothered about the definitions? Have a look round the w3schools website. I would help more but I'm stuck in heathrow waiting for a flight. Quote
boris77 Posted January 11, 2013 Posted January 11, 2013 Pars-ing* XML, plenty of open source libraries to help you (xerces, libxml2). Depends on your programming language of choice, google Pa**ing XML and there is a stack of info. *swear filter thinks this is a bottom reference hence the hyphen. Quote
Dommo Posted January 11, 2013 Posted January 11, 2013 No way! Par...sing is a swear word. IT just got so much cooler Quote
DerekJ Posted January 11, 2013 Author Posted January 11, 2013 I've been banging my head against this ALL SODING DAY. Reading the web is confusing as people seem to use Node and Element differently, depending on who is posting. I'm trying to use TinyXML2 to just walk the tree and read the texts/values but not getting very far. I think I've just found the help files after posting the original post but still confused. Have a good flight DerekJ Quote
Kevin Jones Posted January 11, 2013 Posted January 11, 2013 A node is a reference to how XML data is represented in memory for processing in a DOM, like tinyXML will produce for you. An element is a specific construct in a XML document, so in '<a>foo</a>' we have one element 'a' which contains the text 'foo'. So in the DOM you will have an element node which contains a text node. Often people are a bit lax in how they use 'node' which does make it rather confusing. So someone might point to 'foo' in the document and call it a text node, it's not, it's just text, a pa**ing will create the 'text node'. My day job used to be writing parsers and associated gubbins for XML, drop me a PM if I can help some more. Quote
DerekJ Posted January 11, 2013 Author Posted January 11, 2013 Thanks Kevin, I'm going to have a very large beer now and sleep on it. If I still can't make any sence tomorrow I'll PM. Thanks for the offer. DerekJ P.S. The breadth of knowledge on this site always amazes me. Post a topic as obscure as XML programming in C++ on a car-related web site and several people come back with valid (or even expert) advice! DJ Quote
Graham0127 Posted January 11, 2013 Posted January 11, 2013 You`ve lost me guy`s.......maybe that`s why I`ve got a croosflow Westie ?????? Quote
Graham0127 Posted January 11, 2013 Posted January 11, 2013 Yes I said `croosflow`.......can`t flippin` sell either... Gonna have a haaannnngggggover in the morning. Quote
John Williams (Panda) - Joint Manchester AO Posted January 12, 2013 Posted January 12, 2013 Thanks Kevin, I'm going to have a very large beer now and sleep on it. If I still can't make any sence tomorrow I'll PM. Thanks for the offer. DerekJ P.S. The breadth of knowledge on this site always amazes me. Post a topic as obscure as XML programming in C++ on a car-related web site and several people come back with valid (or even expert) advice! DJ but put a car question on a programming site and i wonder what responce you get! PS i'm IT as well, XML not my bag. cheers john Quote
Dommo Posted January 12, 2013 Posted January 12, 2013 but put a car question on a programming site and i wonder what responce you get! PS i'm IT as well, XML not my bag. cheers john Judging from the people I work with - probably suggestions to buy an Audi Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.