forked from getodk/collect
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added functionality for conversion of XML to JSON
- Loading branch information
Showing
23 changed files
with
3,659 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...collect/collect_app/src/main/java/org/odk/collect/android/helpers/xmltojsonlib/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
32 changes: 32 additions & 0 deletions
32
...llect/collect_app/src/main/java/org/odk/collect/android/helpers/xmltojsonlib/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.odk.collect.android.helpers.xmltojsonlib | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion 33 | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
targetSdkVersion 33 | ||
versionCode 25 | ||
versionName "1.5.3" | ||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'androidx.annotation:annotation:1.5.0' | ||
|
||
// androidTestImplementation 'androidx.test.ext:junit:1.1.5' | ||
androidTestImplementation "androidx.test:runner:1.5.2" | ||
androidTestImplementation "androidx.test:rules:1.5.0" | ||
androidTestImplementation 'androidx.test:core:1.5.0' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.5' | ||
} |
17 changes: 17 additions & 0 deletions
17
...collect_app/src/main/java/org/odk/collect/android/helpers/xmltojsonlib/proguard-rules.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in /Users/aguyon/Library/Android/sdk/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} |
1 change: 1 addition & 0 deletions
1
...p/src/main/java/org/odk/collect/android/helpers/xmltojsonlib/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<manifest package="fr.arnaudguyon.xmltojsonlib" /> |
31 changes: 31 additions & 0 deletions
31
...c/main/java/org/odk/collect/android/helpers/xmltojsonlib/src/main/assets/bug_3_github.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="gb2312"?> | ||
<biblio> | ||
<auteur id="4"> | ||
<nom>Herge</nom> | ||
<ouvrages quantite="1"> | ||
<livre id="0"> | ||
<type>BD</type> | ||
<titre>Le secret de la licorne</titre> | ||
</livre> | ||
</ouvrages> | ||
</auteur> | ||
<auteur id="5"> | ||
<nom>Franquin</nom> | ||
<ouvrages quantite="3"> | ||
<livre id="0"> | ||
<type>BD</type> | ||
<titre>Z comme Zorglub</titre> | ||
</livre> | ||
<livre id="1"> | ||
<type>BD</type> | ||
<titre>Spirou et les hommes bulle</titre> | ||
</livre> | ||
<livre id="2"> | ||
<type>BD</type> | ||
<titre>Le nid du marsupilami</titre> | ||
</livre> | ||
</ouvrages> | ||
</auteur> | ||
<result>1</result> | ||
<result_info>succes</result_info> | ||
</biblio> |
6 changes: 6 additions & 0 deletions
6
...app/src/main/java/org/odk/collect/android/helpers/xmltojsonlib/src/main/assets/common.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<library> | ||
<owner>John Doe</owner> | ||
<book id="007">James Bond</book> | ||
<book id="000">Book for the dummies</book> | ||
</library> |
7 changes: 7 additions & 0 deletions
7
...c/main/java/org/odk/collect/android/helpers/xmltojsonlib/src/main/assets/escape_chars.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<main> | ||
<test>aa="\11"</test> | ||
<test2>aa="42"</test2> | ||
<description><![CDATA[<img src="http://cdn.link.net/154335.jpg" align="left" hspace="7" width="120" height="90"/>any desc here.]]> | ||
</description> | ||
</main> |
13 changes: 13 additions & 0 deletions
13
...pp/src/main/java/org/odk/collect/android/helpers/xmltojsonlib/src/main/assets/numbers.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> | ||
<map> | ||
<a>42</a> | ||
<b>1498094219318</b> | ||
<c>0.100</c> | ||
<d>1099511627776.5</d> | ||
<e>true</e> | ||
<f>false</f> | ||
<g></g> | ||
<h></h> | ||
<i id="43"/> | ||
<j>44</j> | ||
</map> |
15 changes: 15 additions & 0 deletions
15
...pp/src/main/java/org/odk/collect/android/helpers/xmltojsonlib/src/main/assets/pattern.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<catalog> | ||
<list> | ||
<item id="item A 1"/> | ||
<item id="item A 2"> | ||
<list> | ||
<item id="item B 1"/> | ||
</list> | ||
</item> | ||
<notitem id="notitem Z" /> | ||
</list> | ||
<tlist> | ||
<item id="item C 1"/> | ||
</tlist> | ||
</catalog> |
Oops, something went wrong.