Christian,
thanks for taking your time for some conversations not related to BaseX. I'm hoping to be able to help too in the future.
On Thu, Jun 7, 2012 at 11:57 AM, Christian Grün christian.gruen@gmail.com wrote:
Does well-formed XML can be invalid XML?
The Wikipedia gives you some more information on "well-formed" and "valid" XML documents [1]. Documents are "valid" if they are successfully matched against a schema (usually DTD, XML Schema or RelaxNG).
I am confused. If XQuery requires well-formed (or valid) XML, how can it deals with the invalid XML result of http:send-request?
http:send-request() returns a sequence of two results, each of which is completely well-formed (provided that your result is XML). What you see on your screen is just a textual "serialized" representation of all results; there is no unique bidirectional mapping (Text ↔ XML) for that.
If you want to know more about XQuery and XML, and get more familiar with the wording, you are invited to check out one the available online tutorials, such as [2].
Christian
[1] http://en.wikipedia.org/wiki/XML [2] http://www.w3schools.com/xquery/default.asp