I have a xml which has nodes like <abc/>. My scanner fails to recognise them. So I need to transform the nodes <abc/> to <abc></abc> before calling the scanner.

Almagest FUTT

You do actually mean <abc/> when you say "singleton nodes", don't you ? For otherwise, it wouldn't be surprising they made a fuss.

A regex would be:
perl: s|<(w+)s*/>|<$1></$1>|g;
java: string.replaceAll("<(w+)s*/>", "<$1></$1>");


About | Sitemap | Contact