Posted by alexadr
on May 31, 2005 at 11:01 PM PDT
I have such a problem:
I have XML document that uses XSD-schema.
In XSD-schema there is element that have two atributes:
And in XML document I write:
According to the XSD-schema parser must add to El1 second attribute "atr2" with its default value because it has default value. But when I do such a code:
factory = DocumentBuilderFactory.newInstance();
builder = factory.newDocumentBuilder();
doc = builder.parse(new File("file1.xml"));
pEl = doc.getDocumentElement()
NamedNodeMap Attribs = pEl.getAttributes();
In the list of attributes "Attribs" - there is no attribute "attr1"!!!
What I have to do???