nostrodamned Posted November 8, 2008 Share Posted November 8, 2008 I have another thread with something similar going but i thought i would post another in order to simplify what i am trying to achieve. This is the XML <ModelLijn ModelLijnID="524f9f9b-d7f7-4cfd-8a52-1f0c120de36e" MerkID="508a8c11-a5c2-4218-bc25-64a377fd7314" Generatie="" ModelCodeFabrikant="" ModelLijnCode="MIN" CategorieID="81a47c1b-dec8-4aae-b856-93abe83a777e" SegmentID="70184a1b-e31e-48d9-b001-cf16fc21a4a0" StartDatum="2006-10-01" EindDatum="" Status="1"> <Model NL="Mini (R56)" EN="Mini (R56)" FR="Mini (R56)" /> </ModelLijn> Basically I want to do this in php Where MolLijnID = variable value return the NL attribute text for that Model. Any dirty solution here would be great!!(and sorry for reposting but its really urgent!!) Link to comment https://forums.phpfreaks.com/topic/131932-xml-parsing-help/ Share on other sites More sharing options...
RichardRotterdam Posted November 8, 2008 Share Posted November 8, 2008 I think this link can help you out http://www.onlamp.com/pub/a/php/2004/01/15/simplexml.html I am guessing that your xml data is only a part of the total. is that the total structure of the xml file or is modellijn nested? Link to comment https://forums.phpfreaks.com/topic/131932-xml-parsing-help/#findComment-685459 Share on other sites More sharing options...
nostrodamned Posted November 8, 2008 Author Share Posted November 8, 2008 Hi, This is the total structure of the xml file (there is more data but i trimmed it!) <?xml version="1.0" encoding="utf-8"?> <ModelLijnenExport> <Header> <Sender>RDC VGS EP</Sender> <Receiver>NED_MINI</Receiver> <DocumentType>Full ModelLijnen</DocumentType> <CreationDate>20080918</CreationDate> </Header> <ModelLijnen> <ModelLijn ModelLijnID="524f9f9b-d7f7-4cfd-8a52-1f0c120de36e" MerkID="508a8c11-a5c2-4218-bc25-64a377fd7314" Generatie="" ModelCodeFabrikant="" ModelLijnCode="MIN" CategorieID="81a47c1b-dec8-4aae-b856-93abe83a777e" SegmentID="70184a1b-e31e-48d9-b001-cf16fc21a4a0" StartDatum="2006-10-01" EindDatum="" Status="1"> <Model NL="Mini (R56)" EN="Mini (R56)" FR="Mini (R56)" /> </ModelLijn> <ModelLijn ModelLijnID="b2692f3f-3ca7-4503-9923-43c5c5c46eea" MerkID="508a8c11-a5c2-4218-bc25-64a377fd7314" Generatie="" ModelCodeFabrikant="" ModelLijnCode="MIN" CategorieID="81a47c1b-dec8-4aae-b856-93abe83a777e" SegmentID="aefef3ec-8482-447f-b599-45d07265db37" StartDatum="2004-01-01" EindDatum="" Status="1"> <Model NL="MINI Cabrio" EN="MINI Cabrio" FR="MINI Cabrio" /> </ModelLijn> <ModelLijn ModelLijnID="ed676cb5-8ede-414c-b934-d4b763c753ea" MerkID="508a8c11-a5c2-4218-bc25-64a377fd7314" Generatie="" ModelCodeFabrikant="" ModelLijnCode=" " CategorieID="81a47c1b-dec8-4aae-b856-93abe83a777e" SegmentID="63e3485f-ccb2-4000-beaa-1ebad89504d6" StartDatum="2007-09-12" EindDatum="" Status="1"> <Model NL="Mini Clubman (R55)" EN="Mini Clubman (R55)" FR="Mini Clubman (R55)" /> </ModelLijn> </ModelLijnen> </ModelLijnenExport> Link to comment https://forums.phpfreaks.com/topic/131932-xml-parsing-help/#findComment-685491 Share on other sites More sharing options...
Barand Posted November 8, 2008 Share Posted November 8, 2008 Double post - locked Link to comment https://forums.phpfreaks.com/topic/131932-xml-parsing-help/#findComment-685564 Share on other sites More sharing options...
Recommended Posts