getelementsbytagname - DomDocument getElementbytagname is empty -


i'm trying parse xml when try first line

<operations username="test" password="test" > 

i try retrieve value line without success. i've try make foreach on childnode counts 0

$operations = $domlead->getelementsbytagname("operations")->item(0)->getattribute("type"); 

for information here xml

<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>     <operations username="test" password="test" >         <setrequest>             <personaldata>                             <careid/>                             <leadid>it1234</leadid>                             <name>john</name>                             <surname>doe</surname>                             <secondsurname>smith</secondsurname>                             <salutation>mr</salutation>                             <phone>+39011525354</phone>                             <mobile>+393381234567</mobile>                             <email>email@email.com</email>                             <address>via po 10</address>                             <city>turin</city>                             <district>piedmont</district>                             <zipcode>10100</zipcode>                             <country>1000</country>                             <language>5</language>                             <gender>male</gender>                             <birthplace />                             <birthdate>1990/02/17 00:00</birthdate>                             <personalid>krtcbn65r55g822p</personalid>                             <job>workman</job>                             <company>apple</company>                             <companyid/>                             <purchaseintention>12+</purchaseintention>                             <ownedcar brandcode="0f1" modelcode="y03" branddescription="citroen" modeldescription="citroen c4 picasso" enginetype="petrol" odometer="" registerdate="" chassisnumber="" platenumber="" price="" carrecovered=""/>                             <extrafield id="1" fieldname="pobox">0112947</extrafield>                             <extrafield id="2" fieldname="second address">piazza di spagna 5, roma</extrafield>             </personaldata>         <privacydata>             <specificprivacy>1</specificprivacy>             <extendedprivacy>                 <privacy channeltype="phone">1</privacy>                 <privacy channeltype="email">0</privacy>                 <privacy channeltype="post">0</privacy>             </extendedprivacy>         </privacydata>         <requestdata>                     <channel>internet</channel>                     <source>internet site</source>                     <sourcedetail>form td</sourcedetail>                     <sourcecode />                     <campaigncode />                    <level1>web corporate</level1>                      <level2>standard</level2>                      <level3 >n_a</level3 >                      <level4>brand</level4>                      <campaign>campaign test</campaign >                      <offer>offer test</offer >                      <useddevice>mobile</useddevice>                      <requestsgroup> </requestsgroup>                     <requestdate>2013/02/27 17:34</requestdate>                     <requestsgroup brand="fiat" brandid="00">                         <dealer name="spazio s.p.a." sincom="62211" sitecode="123" address="via dei missaglia 89" market="1000" city="torino" province="torino" email="mydealer@dealer.com" dealerzipcode="10022"></dealer>                         <request type="td" detail="">                               <carmodel code="150" modeldescription="" enginetype="petrol"/>                         </request>                     </requestsgroup>         </requestdata>      </setrequest> 

thanks help


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -