Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

element with element or text #12

Open
sagar15795 opened this issue Aug 12, 2016 · 0 comments
Open

element with element or text #12

sagar15795 opened this issue Aug 12, 2016 · 0 comments

Comments

@sagar15795
Copy link

I want to parse XML which can have two forms:

<?xml version="1.0" encoding="UTF-8"?> 
<workflow uri="http://www.myexperiment.org/workflow.xml?id=2770" resource="http://www.myexperiment.org/workflows/2770" id="2770"version="1">Disability estimates by year</workflow>

or:


<workflow uri="http://www.myexperiment.org/workflow.xml?id=12" resource="http://www.myexperiment.org/workflows/12" id="12" version="2">
<id>12</id>
<title>Transcribe a DNA sequence into an RNA sequence</title>
</workflow>

How can I do this? When I try to declare both @Element and @Text in class responsible for Workflow parsing then the exception is thrown when I try to parse XML to the instance of this class.

I am using it with Retrofit 2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant