0

Just joined stackoverflow

i have this output from my Froinus inverter. i'd like to convert this "id" codes into php or web page. i've tried different ways from SOF , but no lucky. How can i get "id" even there is "m" and "p"?

Thank you

<?xml version="1.0"?>

-<SunSpecData v="1">


-<d t="2017-08-08T17:19:20+02:00" sn="262810007xxxxxxxx" mod="Fronius Primo 6.0-x" man="Fronius">


-<m id="1">

<p id="Mn">Fronius</p>

<p id="Md">Fronius Primo 6.0-1</p>

<p id="Vr">0.x.25.x</p>

<p id="SN">262810007xxxxxxxx</p>

<p id="DA">1</p>

</m>


-<m id="111">

<p id="W">3065.000000</p>

<p id="Wh">14111069.000000</p>

<p id="St">4</p>

<p id="I_AC_CurrentA">13.570000</p>

<p id="I_AC_VoltageA">227.300003</p>

<p id="Hz">50.009998</p>

<p id="DCA">10.070000</p>

<p id="DCV">315.200012</p>

</m>

</d>

</SunSpecData>
WillardSolutions
  • 2,316
  • 4
  • 28
  • 38
CristianM
  • 1
  • 1
  • 1
    Welcome to Stack Overflow! You are expected to try to **write the code yourself**. After [doing research](https://meta.stackoverflow.com/questions/261592), and **post what you've tried** with a clear explanation of what **isn't working** and providing a [Minimal, Complete, and Verifiable](https://stackoverflow.com/help/mcve) example. I suggest reading [How to Ask a Good Question](https://stackoverflow.com/questions/how-to-ask). Also, be sure to take the [tour](https://stackoverflow.com/tour). – GrumpyCrouton Aug 08 '17 at 15:33
  • 1
    Tried searching for something like: "Parse XML with PHP"? You actually need to do the research. If you get stuck, then come back and show us what you've tried and where you're stuck. – M. Eriksson Aug 08 '17 at 15:33
  • 1
    Possible duplicate of [How do you parse and process HTML/XML in PHP?](https://stackoverflow.com/questions/3577641/how-do-you-parse-and-process-html-xml-in-php) – ThW Aug 08 '17 at 15:33
  • Are those dashes before some of the tags valid XML? I haven't seen it like that before. – Don't Panic Aug 08 '17 at 15:35
  • i write again: this is the output xml file uploaded on my web site. i would like to convert it. yes i followed another post but without success https://stackoverflow.com/questions/3035310/read-xml-tag-id-from-php – CristianM Aug 08 '17 at 16:20

0 Answers0