Update PraserState.java

Issue #26: XMLParser doesn't read Binary content from XML. Binary content is discarded during xml parsing, because attribute check of ID is missing in BinaryResourceState.attributeValue(...)
This commit is contained in:
akley 2014-09-25 10:36:29 +02:00
parent 13dd6d5e11
commit b380a8f797
1 changed files with 7 additions and 1 deletions

View File

@ -741,7 +741,13 @@ class ParserState<T> {
@Override
public void attributeValue(String theName, String theValue) throws DataFormatException {
if ("contentType".equals(theName)) {
if ("id".equals(theName)) {
if (myInstance instanceof IIdentifiableElement) {
((IIdentifiableElement) myInstance).setElementSpecificId((theValue));
} else if (myInstance instanceof IResource) {
((IResource) myInstance).setId(new IdDt(theValue));
}
} else if ("contentType".equals(theName)) {
myInstance.setContentType(theValue);
} else if (myJsonMode && "value".equals(theName)) {
string(theValue);