Reputation: 28389
I'm almost positive the answer is "no" but just to be sure... there's no syntactical mechanism for commenting out portions of stuff inside an XML node, right?
In other words something like
<myNode
//this is not being looked at
attributeFoo = "bar"
//this is also being ignored
/>
I'm only asking because there is now SO much stuff that goes into Android's xml nodes that it would be nice to be able to comment stuff out, and/or label things... but I suspect I'm out of luck here...
Upvotes: 2
Views: 413
Reputation: 225124
There isn't. You can only put comments outside of tags. The closest thing to it is probably:
<myNode
throwAway1="This is not being looked at"
attributeFoo="bar"
throwAway2="This is also being ignored"
/>
Or just use normal comments.
Upvotes: 3
Reputation: 137392
You cannot comment inside a tag, but you can wrap a tag as a comment, I have found it helpful many times:
<!-- <Activity></Activity> -->
source: http://www.w3.org/TR/REC-xml/#sec-comments
Upvotes: 1
Reputation: 1476
Unfortunately no. You can have a comment node... but that is as close as you can get
<!-- Comment! -->
Upvotes: 1