Namespace read parameters from an XML file in Actionscript 3.0

Imagine you have an XML file that at some point contains the following line:

1
2
...
type = "image/jpeg" /> <media :thumbnail url = "thumbs/pic10.jpg" type = "image/jpeg" />

As I read, for example, the url attribute in Actionscript 3.0?

If the XML was this:

1
2
...
type = "image/jpeg" /> <Image url = "thumbs/pic10.jpg" type = "image/jpeg" />

) sarebbe stato sufficiente: After obtaining the pointer to &lt;immagine/&gt; ( imgptr ) would be sufficient:

1
imgptr . @ url ) ; trace (imgptr. @ url);

If &lt;media:thumbnail/&gt; , however, add:

1
2
Namespace = myXML . namespace ( "media" ) var mediaNS: Namespace = myXML. namespace ("media")
myXML . mediaNS :: thumbnail . @ url ) ; trace (myXML. mediaNS :: thumbnail. @ url);

There are no comments for this post

Leave a comment

TAG XHTML PERMITS: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> INSERTION CODE:
 <pre></pre> // blocco generico <code></code> // blocco generico [cc_actionscript][/cc_actionscript] // Actionscript [cc_actionscript3][/cc_actionscript3] // Actionscript 3 [cc_css][/cc_css] // CSS Style Sheet [cc_html][/cc_html] // HTML [cc_js][/cc_js] // Javascript [cc_objc][/cc_objc] // Objective-C [cc_php][/cc_objc] // PHP [cc_sql][/cc_sql] // SQL 


Stop SOPA