Need to retrive element name and type from xsd
843834Aug 4 2009 — edited Aug 6 2009Hi,
I am beginner in xml and I need your help in getting element name and their types from XSD. I am developing a logic in which I need to do data type validations between source(XML) and target(Oracle) fields before every load.
My requirement is to retrieve the element name and its type from the xsd file. This is because I can't use getElementsByTagName from the xml because my tags varies with loads. For example for today's load XML can have 10 elements but tomorrow it can have 12 or 8 elements also. Every time there is a change in xml ; xsd is also updated so I want to retreive this info from xsd. I also have complex type attributes in my xsd, so I can't read xsd as an xml file and get elements and attributes?
Any suggestions????
Thanks,
Saurabh