If i’m going to use a XML file to store some information, Am I going to need a XML Parser that read/write data? Can i just use string manipulation functions and why not?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could conceivably use string manipulation functions, as that’s what XML libraries end up using anyway. XML documents are just long strings in a special format. However, unless you know a lot about XML (and what is and isn’t valid XML), using an XML parser/serializer now will save you a lot of trouble later on. There are nuances to XML (namespaces, escape sequences, etc) that will cause issues in homegrown code that doesn’t know how to handle them properly. And by the time you’ve handled all the special cases, you’ll effectively have written a half-assed XML parser anyway.