There are probably more solutions out there for this, but i want to share with you how i check if the String is formatted as valid XML. I made a simple class with one static method to achieve this. You can download it from here and you can use it easily by calling isValid method:
import com.candymandesign.flash.validators.XMLValidator;
XMLValidator.isValid(yourStringGoesHere);
Example above will return true or false as result.
I've make same validation, but problem is, that this validator also validate plain string, which I dont want to validate :) String is string and not XML :)
ReplyDeleteThe download link is broken.
ReplyDeleteCan you post the source code here please.
ReplyDelete