Skip to content

Commit 8825d2b

Browse files
committed
Using @XmlType instead of @XmlRootElement for non root types
Only JAXBPlist is a root element and JAXBArray, JAXBDict etc. are only types XML types but do not need an XSD element declaration as they can only exist inside a Plist type. Change-Id: I70860632b29f342d68cf6bc030e9241893eccf67
1 parent fbc4635 commit 8825d2b

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/main/java/com/sap/prd/mobile/ios/mios/xcodeprojreader/jaxb/JAXBArray.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121

2222
import javax.xml.bind.annotation.XmlElement;
2323
import javax.xml.bind.annotation.XmlElements;
24-
import javax.xml.bind.annotation.XmlRootElement;
24+
import javax.xml.bind.annotation.XmlType;
2525
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
2626

2727
import com.sap.prd.mobile.ios.mios.xcodeprojreader.Array;
2828

29-
@XmlRootElement(name = "array")
29+
@XmlType(name = "array")
3030
@XmlJavaTypeAdapter(JAXBArrayAdapter.class)
3131
public class JAXBArray
3232
{

src/main/java/com/sap/prd/mobile/ios/mios/xcodeprojreader/jaxb/JAXBDict.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
import javax.xml.bind.annotation.XmlElement;
2323
import javax.xml.bind.annotation.XmlElements;
24-
import javax.xml.bind.annotation.XmlRootElement;
24+
import javax.xml.bind.annotation.XmlType;
2525

2626
import com.sap.prd.mobile.ios.mios.xcodeprojreader.Array;
2727

28-
@XmlRootElement(name = "dict")
28+
@XmlType(name = "dict")
2929
public class JAXBDict
3030
{
3131

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.sap.prd.mobile.ios.mios.xcodeprojreader.jaxb;
22

3-
import javax.xml.bind.annotation.XmlRootElement;
3+
import javax.xml.bind.annotation.XmlType;
44

5-
@XmlRootElement(name = "false")
5+
@XmlType(name = "false")
66
public class JAXBFalse
77
{
88
}

src/main/java/com/sap/prd/mobile/ios/mios/xcodeprojreader/jaxb/JAXBKey.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
*/
2020
package com.sap.prd.mobile.ios.mios.xcodeprojreader.jaxb;
2121

22-
import javax.xml.bind.annotation.XmlRootElement;
22+
import javax.xml.bind.annotation.XmlType;
2323
import javax.xml.bind.annotation.XmlValue;
2424

25-
@XmlRootElement(name = "key")
25+
@XmlType(name = "key")
2626
public class JAXBKey
2727
{
2828
private String value;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.sap.prd.mobile.ios.mios.xcodeprojreader.jaxb;
22

3-
import javax.xml.bind.annotation.XmlRootElement;
3+
import javax.xml.bind.annotation.XmlType;
44

5-
@XmlRootElement(name = "true")
5+
@XmlType(name = "true")
66
public class JAXBTrue
77
{
88
}

0 commit comments

Comments
 (0)