6

Are XML parser and XML processor are two different things? Do they two different jobs?

4 Answers 4

2

XML parser and XML processor are the same. It is not applied to another languages. XML is universal data markup language. And parsing XML file already means processing it.

And on another hand processing of XML file means feed up some XML application. Nothing except parsing is not need for it.

Look https://en.wikipedia.org/wiki/XML#Key_terminology

UPD: If you assume "parsing" is syntactic analyzing then it is a "processing". Because XML statements do not make sense by themselves.

Sign up to request clarification or add additional context in comments.

2 Comments

Can you explain to me what this forum talking about, coderanch.com/t/446716/java-Web-Services-SCDJWS/certification/…. They make it look like it two different things. Thanks!
The answer provided in that linked posting is simply incorrect (and ApceH's answer here is basically correct). An XML processor and an XML parser are the same, and this is clearly described in the authoritative XML reference, the W3C XML Recommendation. See my answer for details.
1

"Parser" is a general name people use to describe any kind of software that reads through a structured data representation. "Processor" is what the XML specification has decided to call that piece of software, maybe in an attempt to use a name that is a bit less generic than "XML parser". so while you might say that these things are the same, if you are a standards person, you might want to call it "processor", but if you want to talk to regular programmers and developers, describing it as a "parser" will help them to understand what you're talking about. From the XML spec introduction:

  • "[Definition: A software module called an XML processor is used to read XML documents and provide access to their content and structure.] [Definition: It is assumed that an XML processor is doing its work on behalf of another module, called the application.] This specification describes the required behavior of an XML processor in terms of how it must read XML data and the information it must provide to the application."

Comments

1

Yes, an XML parser and an XML processor are the same.

In the W3C Extensible Markup Language (XML) Recommendation, the definitive authority of the XML standard, XML processor is the formal term used for an XML parser:

[Definition: A software module called an XML processor is used to read XML documents and provide access to their content and structure.] [Definition: It is assumed that an XML processor is doing its work on behalf of another module, called the application.]

[Emphasis added]

The process of read[ing] XML documents and provid[ing] access to their content and structure is precisely the process of parsing, which is done on behalf of an XML application.

You might use XML parser colloquially and XML processor more formally, but they are the same.

Comments

1

Appart from Formal definitions which merge the two definitions, it is possible to point some differences:

  • XML parser is an app/library able to read, analyze, and get the structure of XML input;

  • XML processor could be seen as a wider app/library, able to process more on a XML input: parse (like parser), modify, transform, select, delete, rewrite, output, using XPath and XSLT.

5 Comments

"read, analyze, and get the structure"... what for? If you have a reason for it then you are processing XML data.
XML processor could be seen as a wider app/library Yes, it could in some abstract sense, but that's just not how the term XML processor is used in the XML Recommendation, and consequently, that's not how it's come to be used in practice either. It's synonymous with XML parser. This answer is therefore misleading.
@kjhughes question dont refer to official XML recommendation, but points parse vs process. how do you call xpath-processing, xslt-processing, ... ?
The question refers quite specifically to XML parser vs XML processor, not parser vs processor generically. Your answer obfuscates the fact that XML parser and XML processor are synonymous in both the XML Recommendation and in common usage in the XML realm.
The question does not specify that the terms "XML parser" and "XML processor" are interpreted strictly in accordance with the XML Rec. The plain meanings of the terms is different, and in the real world, taking data of any form and "parsing" it is different than "processing" it. The fact that the XML Rec decided to say that two terms will "officially" mean the same thing doesn't change the fact that outside of that rec they don't. @ApceH: many cases exist where parsing only, without processing, is desirable. just b/c processing usu requires parsing doesn't mean they are the same or inseparable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.