-4

How do I fetch a date from a XML document when it keeps on changing it's format using Java:

sometimes it will be

<date> from 1:00 pm to 2<00 pm it was raining<\date>

sometimes it will be

<date> between 1:00 pm and 2<00 pm it was raining<\date>

sometimes it will be

<date> from 1:00 pm & 2<00 pm it was raining<\date>

sometimes it will be

<date> from 1:00 to 2<00 pm it was raining<\date>
4

1 回答 1

0

假设您不能将文档更改为使用相同的格式,您将不得不使用正则表达式。有关更多详细信息,请参阅模式文档

于 2013-01-24T14:08:53.067 回答