Newbie quesiton.

JustSomeGuy

Usenet Archive
Joined
Jan 24, 2000
Messages
156
Reaction score
0
What is the purpose of the ?s in this xml:
<?xml version="1.0"?>

can this be written as:
<?xml version=\"1.0\"?>
</?xml>
 

JustSomeGuy

Usenet Archive
Joined
Jan 24, 2000
Messages
156
Reaction score
0
Bjoern Hoehrmann said:
* JustSomeGuy wrote in comp.text.xml:

Basically to ensure that this is not confused with e.g.

<xml version="1.0">

which would not make much sense.

Why wouldn't that make sense?
Is there something special about the '?' character in xml?
ie is this legal?

<?foo v="100"?>
or
 

Bjoern Hoehrmann

Usenet Archive
Joined
Aug 15, 2000
Messages
719
Reaction score
0
* JustSomeGuy wrote in comp.text.xml:
Why wouldn't that make sense?

People and possibly processors would confuse it with element syntax, for example.
Is there something special about the '?' character in xml?

Well, to some extend yes, it is used to construct the XML declaration and processing instruction.
ie is this legal?

<?foo v="100"?>

Yes, that's a processing instruction, check http://www.w3.org/TR/REC-xml to learn more about processing instructions.
or
<?foo v="100">
</?foo>

That's legal if there is a closing ?> following it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,802
Members
249,594
Latest member
henrywalsh

Latest Threads

Top