how to parse???

21 views
Skip to first unread message

Jonatan Mayorano

unread,
Mar 23, 2012, 12:30:00 PM3/23/12
to Piriti
Hello, I need parse this sentence <field name=" ">value</field> but I
don't know how to do this. Please help me. Thanks

Harald Pehl

unread,
Mar 24, 2012, 8:25:30 AM3/24/12
to pir...@googlegroups.com
What kind of mapping do you have?

- Harald

Wayne Marsh

unread,
May 23, 2012, 1:12:51 PM5/23/12
to pir...@googlegroups.com
This does seem broken (I'm using 0.8). For example, here's Piriti reading from XML into a POJO and then writing it out again. The results aren't consistent.

Class mapping:

public class SomeClass
{
@Path("field")
public String text;
@Path("field/@name")
public String name;
}

Input XML (mapped correctly on read):

<someClass>
<field name="nameValue">value</field>
</someClass>

Output XML (this isn't right, there are two field nodes!):

<?xml version="1.0" encoding="UTF-8"?>
<someClass>
<field>value</field>
<field name="nameValue"/>
</someClass>

Harald Pehl

unread,
May 23, 2012, 2:58:07 PM5/23/12
to pir...@googlegroups.com
Seems to be a bug. Could you please open an issue. I will try to fix this asap.

- Harald

-- Harald Pehl

Wayne Marsh

unread,
May 23, 2012, 4:04:52 PM5/23/12
to pir...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages