ADcyclelucraphy
New Member
I have one field \[code\]$xml\[/code\] that contains some XML value. First I must mention that elements are not seperated each in new line (row) but they are bounded together like a String without new lines.I will first display XML structure how it looks to be easily "readable".\[code\]<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <p:queryBillingAccountResponse xmlns=" http://www.ibm.com"> <ns0:customerAccount xmlns:ns0=" http://www.ibm.com/xmlns/"> <AccountStatus>Paid</AccountStatus> <ComponentCustomerAccount> <Name>ADSL 4</Name> <CharacteristicValue> <Characteristic> <Name>Balance</Name> </Characteristic> <Value>0.0</Value> </CharacteristicValue> <AccountStatus>Paid</AccountStatus> </ComponentCustomerAccount> </ns0:customerAccount> </p:queryBillingAccountResponse> </soapenv:Body></soapenv:Envelope><AccountStatus>Paid</AccountStatus></ComponentCustomerAccount></ns0:customerAccount></p:queryBillingAccountResponse></soapenv:Body></soapenv:Envelope>\[/code\]but I again I must mention that real value in $xml field is not so easily readable.On example it looks like this\[code\]<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><p:queryBillingAccountResponse xmlns=" http://www.ibm.com">.......\[/code\]I want to delete elements : \[code\]?xmlversion\[/code\] \[code\]soapenv:Envelope\[/code\] and \[code\]soapenv:Body\[/code\] along with their attributes. I want to delete them on the beggining and on the end of xml value. Everything else stays as it is1 How to achive this? So my new value in php field should start from \[code\]queryBillingAccountResponse\[/code\] element. thank you