List Info

Thread: Re: Problem with BasicXMLDeserializer




Re: Problem with BasicXMLDeserializer
country flaguser name
France
2007-09-17 12:04:23
Thank you for your answer
The problem is that I can't update the XML file.

But in your example, how can I get the attribute
"type" in the "id" node ?
It's a valid XML syntaxe. So normally I can get it. No ?


> Matthieu a écrit :
> > I'm having problems with pixlib
BasicXMLDeserializer. I'm trying to
> > parse an XML and I can’t find some information.
> >
> > For exemple:
> >
> > <node id=”myId”>MyText</node>
> >
> > I can’t find the “id” attribute in the parsing.
> 
> Try like this :
> <node>
> 	<id type="string">myId</id>
> 	<child>
> 		<some attribute/>
> 		...
> 	</child>
> </node>
> 
> >
> >
> >
> > I can find it if I modify my XML to:
> >
> > <node
id=”myId”><child>MyText</child></node>
> >
> >
> >
> > Is my XML not valid ?
> >
> > Or the deserializer doesn’t implement this
specificity ?
> >
> >
> >
> > Matthieu Brau
> >
> >
> >
> >
> >
------------------------------------------------------------
------------
> >
> > _______________________________________________
> > Pixlib mailing list
> > Pixlibosflash.org
> > http://osflash.org/mailman/listinfo/pixlib_osflash.org

> 
> 
> --
> Simon
> 
> _______________________________________________
> Pixlib mailing list
> Pixlibosflash.org
> http://osflash.org/mailman/listinfo/pixlib_osflash.org

> 








_______________________________________________
Pixlib mailing list
Pixlibosflash.org
http://osflash.org/mailman/listinfo/pixlib_osflash.org


Re: Problem with BasicXMLDeserializer
country flaguser name
France
2007-09-18 02:28:43
Matthieu a écrit :
> Thank you for your answer
> The problem is that I can't update the XML file.
> 
> But in your example, how can I get the attribute
"type" in the "id" node ?
> It's a valid XML syntaxe. So normally I can get it. No
?

I think the BasicXMLDeserializer only works with this type
of syntax but 
you can write and provide a custom deserializer which will
use 
attributes instead of child nodes to populate object
attributes.

-- 
Simon.


_______________________________________________
Pixlib mailing list
Pixlibosflash.org
http://osflash.org/mailman/listinfo/pixlib_osflash.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )