I have a short question. Why XML files should be validated and not just well-formed?  I looked at several places for an answer to this question but I have not found a good one.
84762
I wasn't aware of a difference, but a coworker says there is, although he can't back it up. What's the difference if any?
44751
It might be a stupid question, but I always wondered (and was afraid to ask :)) why tags are written in lowercase whereas sometimes it's confusing and not really correct?  For example, IMHO, JComboBox is a better name than . The same about  and Java.  Is there any specific reason why all tags are lower-cased? It might confuse some users, as I always correct people who write ArrayIndexOutOfBounds instead of ..
5180
From this quote from , referring to the recent mass retagging here:  It left questions untagged. Yeah, it's meta, so there's required tags but those required tags are meta tags... literally. If a question doesn't have any tags other than the required tag, it's untagged! We don't prevent this, but maybe we should.  Do you agree with the point of view that questions here only consisting of required tags are effectively untagged? Should we prevent questions here on meta from only having one or more of the required tags , , , or ? I'm neutral about it; I just want to see what others think.
11664
I am just curious that the following format looks good to you or not? The preamble I used is just   \documentclass[12pt,a4paper]{article}  \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb}   I don't feel it's so good because the first paragraph has no indent but the second does. If the first paragraph is much longer, than it's fine. But if not, it looks strange. Should I leave it, or you have suggestions for this?
68167
I'm loading an XML document in my C# application with the following:  XDocument xd1 = new XDocument(); xd1 = XDocument.Load(myfile);   but before that, I do test to make sure the file exists with:  File.Exists(myfile);   But... is there an (easy) way to test the file before the XDocument.Load() to make sure it's a valid XML file?  In other words, my user can accidentally click on a different file in the file browser and trying to load, say, a .php file causes an exception.    The only way I can think of is to load it into a StreamWriter and simple do a text search on the first few characters to make sure they say "  Thanks!  -Adeena
26350
I've often seen questions getting questioned and people coming up with anwsers that are totaly irrelevant.  For example, in  I was looking for a library that adds attributes in a certain order to XML documents. Someone on Stack Overflow was asking about this, and all he got was people telling him that this is not XML standard and he shouldn't do that. I needed ordering attributes too because of readability, but all I found were useless answers. I had to ask the question again and provide reason in order to get useful answers.  Providing a reason for a question might be a good thing, but is it really so hard to answer questions, even if who asked did not explain all the details about his reason for asking?
6507
This is something that I always find a bit hard to explain to others:  Why do XML namespaces exist?  When should we use them and when should we not? What are the common pitfalls when working with namespaces in XML?   Also, how do they relate to XML schemas? Should XSD schemas always be associated with a namespace?
7217
I don't see any case where the  tag could be useful (or  for that matter).  are always tagged with a programming language, which is much more pertinent.  Should it be Burninated?
100943
How can I generate valid XML in C#?
122513
There's been a lively conversation (such as it can be in 140 chars) lately about whether it is better to put CSS files on the disk in the _layouts folder or to store them in a Document Library in the Site Collection.  This seemed like a good place to post the topic to allow some longer discussion about it.  As for me, I always prefer to avoid putting anything on the disk if I can avoid it.  I prefer a Document Library for the CSS. There are many reasons for this, but here are some: versioning, fine-grained permissions, approval processes, they are a part of a Site Collection backup, touching the server can lead to problems, etc.  I also don't believe that files on the disk will be served up any faster than files in SQL if SQL is managed correctly.  What's your opinion? Weigh in!
99844
SEO seems to be a subject surrounded by both myths and varying opinions. Nevertheless, I would like to know if you have an opinion on how important it is to have semantically correct XHTML, that is, well-formed and valid XHTML, with regards to SEO.
53432
I am trying to look for all XML files in a particular directory and all sub-directories (recursively) inside it.  ls -R *.xml is only listing files in the current directory. I am quite sure, the sub-folders themselves have several .xml files, but none are showing up.  Is this a configuration issue?
123420
, upon which I'm trying to use importxml() but it just won't work properly.  Until moments ago, not a single one of the formulas on this sheet would load at all, they just hung on "Loading...", but just as I began this question, some of the cells began populating with data.  This is the follow-on  that turned out to be an issue with the XPath and how importxml() handles it.  But that led me to this issue.  Can anyone see what is wrong with  and why the function won't behave properly?
21604
I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end.  I've got a good set of input/output message pairs so all I need to do is send the input messages in and listen for the XML message to come out the other end.  When it comes time to compare the actual output to the expected output I'm running into some problems.  My first thought was just to do string comparisons on the expected and actual messages.  This doens't work very well because the example data we have isn't always formatted consistently and there are often times different aliases used for the XML namespace (and sometimes namespaces aren't used at all.)  I know I can parse both strings and then walk through each element and compare them myself and this wouldn't be too difficult to do, but I get the feeling there's a better way or a library I could leverage.   So, boiled down, the question is:  Given two Java Strings which both contain valid XML how would you go about determining if they are semantically equivalent?  Bonus points if you have a way to determine what the differences are.
97619
In a few large projects i have been working on lately it seems to become increasingly important to choose one or the other (XML or Annotation). As projects grow, consistency is very important for maintainability.   My questions are: what are the advantages of XML-based configuration over Annotation-based configuration and what are the advantages of Annotation-based configuration over XML-based configuration?
25980
suggested to have templates for tags. Their example was with the  tag on Stack Overflow.  I'm suggesting a more general approach:  Templates, Mark II  I suggest that each site will have a template. That template will prefill the  textbox when a new question is asked. However, it will be completely optional.  Something like (for Stack Overflow):  ## The Problem ## { Please tell us what the problem is with as many details as possible.   Include language, operating system, and any other relevant information.   Remember to add the relevant tags below, too. } ## Attempted Solutions ## { Please tell us what you've tried so far. Have you tried searching Google?    What queries? } ## Existing Code ## { Do you have any existing code to show? Please keep it short and simple.    We should be able to detect the problem right away. }   Why am I suggesting this?  Well, it seems as though most users will stick with the default. They don't bother to read, and so prefilling the question form for them with information that we know might be relevant, will forceWe'll get to that in a second them to actually stop and read.  Scenarios:   Best case: User arrives to ask a question, actually reads the template, fills the correct information in the placeholders. (Yeah, because that'll happen a lot) Neutral: User simply removes all of the template text and rewrites their own question. Result is exact same as we have currently. Worst case: User will ignore or misunderstand the template, will use it wrong or not at all and we'll get something like  &lt;template text here, still unfilled&gt; &lt;(crappy) question&gt;   This can be solved in a couple different ways. We could detect the template tags (i.e. { }, subject to discussion), and throw an error when a user attempts to post with them still available. We could also act more autonomously and remove placeholders which still exist.    Some more points:   Templates should be per-site, not per-tag. Sure, there are differences between the tags, but all questions are expected to have the same general information, and this isn't meant to be a rule, but a guideline to help write better questions. Site templates should be editable by that site's mods, like close reasons. We could autofocus on the first placeholder, and perhaps implement TAB to jump from one placeholder to the other, similar to mixins in IDEs. This doesn't have to be implemented everywhere. This suggestion makes sense to Stack Overflow or Superuser, but not to Anime &amp; Manga or Gaming All of the details are subject to discussion, and all discussion is welcomed.
85083
The following code helps me validate an XML file with an XSD schema.  XmlReaderSettings settings = new XmlReaderSettings(); settings.Schemas.Add(null, xsdFilePath); settings.ValidationType = ValidationType.Schema; settings.ValidationEventHandler += new System.Xml.Schema.ValidationEventHandler(settings_ValidationEventHandler); XmlDocument document = new XmlDocument(); document.Load(xmlFilePath); XmlReader rdr = XmlReader.Create(new StringReader(document.InnerXml), settings);  while (rdr.Read()) {  } isValid = true;   The ValidationEventHandler also tells me what the errors are, but doesn't tell me on 'where' or 'on which line' they are located. Is there any way to get the line number where the XML fails to be validated?