Unless you can guarantee a very limited scope of XML input (e.g. something only ever produced by a single source that will always produce the exact same formatting / layout / character encoding / ...) you're just asking for trouble. Even with such constraints your code is going to be "brittle" because a valid XML document that varies from those constraints will break your parsing. And inevitably you'll get said valid-but-unexpected document at just the wrong time.
If you're going to need to handle arbitrary XML you want to use a real parser.
The cake is a lie.
The cake is a lie.
The cake is a lie.