Jump to content

Recommended Posts

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

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.