Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String from XML?
#4
I figured out how to get the file. I chose to use wget to handle the text file creation. If anyone would like me to share the wget process just shout. It works well for XML or JSON online or localhost. So this works very well.
Code:
Copy      Help
str sxml wg fil

fil = "C:\BASE\file1.txt"
wg = "C:\Temp\wg.bat"

;out wg
run(wg)



sxml.getfile(fil)

IXml x._create
x.FromString(sxml)
IXmlNode e = x.RootElement.Child("time")
IXmlNode f = x.RootElement.Child("volume")

out e.Value
out f.Value
However, my XML looking like this I cannot seem to grab info from a tag named info. There are multiple with that name. I need a specific one. I need to get the value inside of the info tag with the name="filename" attribute. To be clear the exact information I would need here would be SheetRockWork.mp4 Thanks
Code:
Copy      Help
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>

<root>

<fullscreen>false</fullscreen>
<aspectratio>default</aspectratio>
<audiodelay>0</audiodelay>
<apiversion>3</apiversion>
<currentplid>3</currentplid>
<time>20</time>
<volume>51</volume>
<length>32</length>
<random>false</random>
<audiofilters>
  <filter_0></filter_0></audiofilters>
<rate>1</rate>
<videoeffects>
  <hue>0</hue>
  <saturation>1</saturation>
  <contrast>1</contrast>
  <brightness>1</brightness>
  <gamma>1</gamma></videoeffects>
<state>playing</state>
<loop>false</loop>
<version>3.0.16 Vetinari</version>
<position>0.64083784818649</position>
<repeat>false</repeat>
<subtitledelay>0</subtitledelay>
<equalizer></equalizer><information>
    <category name="meta">
    <info name='encoded_by'>Lavf58.29.100</info><info name='filename'>SheetRockWork.mp4</info>    </category>
  <category name='Stream 0'><info name='Type'>Video</info><info name='Frame rate'>120</info><info name='Video resolution'>1920x1080</info><info name='Codec'>H264 - MPEG-4 AVC (part 10) (avc1)</info><info name='Decoded format'></info><info name='Buffer dimensions'>1920x1088</info><info name='Chroma location'>Left</info><info name='Language'>English</info><info name='Orientation'>Top left</info></category><category name='Stream 1'><info name='Codec'>MPEG AAC Audio (mp4a)</info><info name='Channels'>Stereo</info><info name='Bits per sample'>32</info><info name='Sample rate'>48000 Hz</info><info name='Language'>English</info><info name='Type'>Audio</info></category>  </information>
  <stats>
  <lostabuffers>0</lostabuffers>
<readpackets>756</readpackets>
<lostpictures>7</lostpictures>
<demuxreadbytes>9144282</demuxreadbytes>
<demuxbitrate>0.32542899250984</demuxbitrate>
<playedabuffers>1021</playedabuffers>
<demuxcorrupted>0</demuxcorrupted>
<sendbitrate>0</sendbitrate>
<sentbytes>0</sentbytes>
<displayedpictures>2469</displayedpictures>
<demuxreadpackets>0</demuxreadpackets>
<sentpackets>0</sentpackets>
<inputbitrate>0.33028799295425</inputbitrate>
<demuxdiscontinuity>2</demuxdiscontinuity>
<averagedemuxbitrate>0</averagedemuxbitrate>
<decodedvideo>4997</decodedvideo>
<averageinputbitrate>0</averageinputbitrate>
<readbytes>9227183</readbytes>
<decodedaudio>2043</decodedaudio>
  </stats>
</root>


Messages In This Thread
String from XML? - by pctechtv - 03-04-2022, 12:14 PM
RE: String from XML? - by Kevin - 03-04-2022, 04:33 PM
RE: String from XML? - by pctechtv - 03-06-2022, 05:51 AM
RE: String from XML? - by pctechtv - 03-06-2022, 09:34 AM
RE: String from XML? - by Kevin - 03-06-2022, 02:18 PM
RE: String from XML? - by pctechtv - 03-06-2022, 09:10 PM
RE: String from XML? - by Kevin - 03-09-2022, 02:57 PM
RE: String from XML? - by pctechtv - 03-12-2022, 02:41 PM
RE: String from XML? - by pctechtv - 05-23-2023, 04:29 AM
RE: String from XML? - by pctechtv - 05-23-2023, 12:51 PM
RE: String from XML? - by Kevin - 05-23-2023, 05:34 PM
RE: String from XML? - by pctechtv - 05-25-2023, 03:54 PM
RE: String from XML? - by Kevin - 05-27-2023, 12:08 PM
RE: String from XML? - by pctechtv - 06-07-2023, 04:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)