Link to home
Start Free TrialLog in
Avatar of Rahamathulla_J
Rahamathulla_J

asked on

xml string

i want to retrieve the tag value from the xml string without load it into xml document.

Is possible? how?
Avatar of adathelad
adathelad
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi Rahamathulla_J,

It can be done either using some string manipulation or potentially complex regular expressions (depending on how complex it needs to be -i.e. do you need to extract a value from a node nested so many levels down  in the document), but is there a reason why you can't load it into an XMLDocument object?

It would save you reinventing the wheel.

ASKER CERTIFIED SOLUTION
Avatar of ankitbansal
ankitbansal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ankitbansal
ankitbansal

here is a regular expression that would match any tag without attribute and starting with a alphabet!

<[A-Za-z][A-Za-z0-9]*>

and this reg exp would match anytag (ofcource without attribute) <[A-Za-z0-9]*>