[xml] Clone the reader?

I'm using the xmlreader interface to parse a document defined by a
schema. When there is a node defined by a union

<xsd:simpleType name="MyUnion3">
  <xsd:union memberTypes="xsd:string xsd:boolean xsd:decimal xsd:time
xsd:float xsd:double">

processing is supposed to try all alternatives (try to decode it as a
string, then as a boolean, etc) until one is successful. However, this
would require the reader to back up each time, which doesn't appear to
be possible. Is there a way to implement this, perhaps by cloning the
parser at that point for each alternative ?

Life is complex, with real and imaginary parts

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]