-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conflict with tag having both the xml value and xml element #16
Comments
Can you paste your marshalling model configuration ? |
Dear Yann Eugoné, I am really sorry to say that I really do not know about "marshallong Kind Regards, On Wed, Dec 3, 2014 at 2:32 PM, Yann Eugoné [email protected]
|
Ok, this Bundle is trying to achieve XML to object mapping, so it can help you building the (de)serialization (called marshalling and unmarshalling) rules of your objects to(from) XML. But the bundle is not able to do this without some configuration... Please read the doc |
Thanks for the reply. |
This Bundle IS able to :
Let's take an exampleWith the class : namespace My\Bundle\Model;
use Level42\NotJaxbBundle\Annotation as Marshall;
/**
* @Marshall\XmlObject(name="email")
*/
class Email
{
/**
* @Marshall\XmlElement(name="Subject")
*/
protected $subject;
/**
* @Marshall\XmlElement(name="ToAddresses")
*/
protected $toAddresses;
} You can get such a XML : <email>
<Subject>Test mail</Subject>
<ToAddresses>[email protected],[email protected]</ToAddresses>
</email> |
If also contails value like /** Now when i am trying to set or its not working. If I remove the above fraction of code it is working fine. I do not know whats the problem. Hope you understood my problem. |
Ok, if I understand your need, you got such a XML ? <email>
[email protected]
<Subject>Test mail</Subject>
<ToAddresses>[email protected],[email protected]</ToAddresses>
</email> |
No I do not have an xml like that. But I'm using different xmls which have Like in 1st xml testmail.test.comin 2nd xml Test mail [email protected],[email protected]and I created class for "email" depending on the above two xmls. And i got On Wed, Dec 3, 2014 at 4:35 PM, Yann Eugoné [email protected]
|
Ok, I will have a look and try to reproduce to your issue later. You can try using XmlRaw until we found a solution. |
So, I tested your use case, and I got the same problem. I created a new branch. @fperinel what do you think we can do for this ? |
I'm having a problem while preparing XML.
If a tag contains both the sub-tags and value( yeah i have different XMLs ) and when i'm trying to set sub-tags it doesn't work and it only sets attributes or value not the sub-tags.
Here is the example from two XMLs.
The text was updated successfully, but these errors were encountered: