HI,

* I have an XML file (actually an epub contentes.opf file) partially shown
as follows:*

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     <package xmlns="http://www.idpf.org/2007/opf";
unique-identifier="bookid" version="2.0">
     <metadata xmlns:dc="http://purl.org/dc/elements/1.1/";>
       <meta name="generator" content="Adobe InDesign 9.0" />
       <meta name="cover" content="x22305.png" />
       <dc:title>My Title</dc:title>
       <dc:creator>The Author</dc:creator>
    etc

*I read the file as:*

    str = XML(fileStream.readUTFBytes(fileStream.bytesAvailable));
    var xmlList:XMLList = XMLList (str);

*My xmlList trace *

    trace(xmlList);

*now shows (seems to have added a default namespcae - not too bothered by
this):*

    <aaa:package unique-identifier="bookid" version="2.0" xmlns:aaa="
http://www.idpf.org/2007/opf";>
      <aaa:metadata xmlns:dc="http://purl.org/dc/elements/1.1/";>
        <aaa:meta name="generator" content="Adobe InDesign 9.0"/>
        <aaa:meta name="cover" content="x22305.png"/>
        <dc:title>My Title</dc:title>
        <dc:creator>The Author</dc:creator>

*How can I access an element from the xmlList (say title)?*

*Tried quite a few variation, so this is driving me a bit nuts and help
would be appreciated.*


*Thanks for any help!*


Phil

Reply via email to