T
Tobias Noebauer
hello,
I have to process an xml-file that uses tags with arbitrary names (these are
the user-chosen names of certain things to be described by that file. don't
blame me, I didn't design that file...), validation against an xml schema is
impossible/useless. therefore, my idea was to convert that file (replace the
arbitrary-name-tags by a new tag with a standard name and move the former,
arbitrary name to an attribute name=...) and then validate it. I'm using the
SAX API in Java. It would be nice to use the XMLFilter Interface to
transform the file, but how can I validate it AFTER it passed through the
filter class? re-convert it to an xml stream and parse it again, this time
using a validating parser? There must be some nicer solution...
Thanks,
Tobias Noebauer
I have to process an xml-file that uses tags with arbitrary names (these are
the user-chosen names of certain things to be described by that file. don't
blame me, I didn't design that file...), validation against an xml schema is
impossible/useless. therefore, my idea was to convert that file (replace the
arbitrary-name-tags by a new tag with a standard name and move the former,
arbitrary name to an attribute name=...) and then validate it. I'm using the
SAX API in Java. It would be nice to use the XMLFilter Interface to
transform the file, but how can I validate it AFTER it passed through the
filter class? re-convert it to an xml stream and parse it again, this time
using a validating parser? There must be some nicer solution...
Thanks,
Tobias Noebauer