So what does "mean" mean? ;-)
The term semantics is fraught with multiple meanings (not surprisingly). Programmers deal with syntax, semiotics and semantics. Syntax defines well-formedness - "are these symbols placed in this manner a valid statement within the language in question"? Semiotics deals with symbolic associations - "when I place these particular symbols together, what specifically are they referring to?" In many cases, when people talk about semantics, what they are actually describing is more properly semiotics. Semantics describes relationships on and between symbols.
In that regard, XML has semantics, though they are usually container/contained semantics. Those semantics are formally identified by a schematic validation system, which imposes a specific "data model" upon the XML instance in question. The schema is not the semantics, but it informs it. When an instance conforms to a specific schema, then it has a contracted set of meanings to whatever process recognizes this particular model.
The one key difference between an XML or JSON and a program is simply that the syntactics of declarative structures such as these are usually simpler than they are for a Java or _javascript_ program.