298 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for borobhaisab

Hello, I do not understand why the simplehtmldom is failing. This is the code: <?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(E_ALL); //--- include_once('simplehtmldom_1_9_1/simple_html_dom.php'); //--- $url = "https://victoriousseo.com/sitemap_index.xml"; $html = new simple_html_dom(); $html->load_file($url); //-- foreach($html->find("a") as $link) { echo $link->href."< br />"; } ?> I got the simplehtmldom.php on the same directory as the …

Member Avatar for Dani
1
1K
Member Avatar for borobhaisab

Hiya, I need to know something. First I thought Sitemap Xml files will list all .html and .hml and .shtm and .shtml files. All pages of the website. But now I see, Sitemap xml files also list other xml files. Check this one out for what I mean: https://www.rocktherankings.com/sitemap_index.xml So …

Member Avatar for Dani
2
901
Member Avatar for himit

I am trying to convert 1 XML into another and want to increment the variable as many times the loop executes. XML Code- [code] <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> <cd> <title>Hide your heart</title> <artist>Bonnie Tyler</artist> <country>UK</country> <company>CBS Records</company> …

Member Avatar for Balakumar_1
1
15K
Member Avatar for it@61@sec

I'm using Gambas as my language.. :-) Now I have a problem getting some values from an XML document. I'm using xml.gb as my "plugin". The XML document is: "<ns1:Event> <ns1:Number>1</ns1:Number> <ns1:Name>Home Team - Away Team</ns1:Name> <ns1:Status Id="100">End</ns1:Status> <ns1:Results> <ns1:Result Id="0" Name="Result">2</ns1:Result> <ns1:Result Id="1" Name="Fulltime">2</ns1:Result> <ns1:Result Id="2" Name="Halftime">0</ns1:Result> </ns1:Results> </ns1:Event>" …

Member Avatar for Joris Claassen
0
2K
Member Avatar for PerplexedB

The following (see the full code below) successfully adds a page in a section in Onenote. What I don't seem to be able to do is to get the lastly created page on top of the section. Here's the code that is puzzling me. onenoteApp.GetHierarchy(sectionId, OneNote.HierarchyScope.hsPages, out string xmlPages); var …

Member Avatar for PerplexedB
0
813
Member Avatar for mitchell.schols

So, i'm working on a layout that has to be in xhtml.. i changed the extension from html > xhtml and i got this prompt.. "This page contains the following errors: error on line 15 at column 8: Opening and ending tag mismatch: link line 0 and head Below is …

Member Avatar for Pradosh_1
0
18K
Member Avatar for Amaina

My question is related to an [answered question](https://www.daniweb.com/programming/web-development/threads/506078/parsing-xml-to-extract-attributes) that was asked here on the ever reliable forum - Daniweb. I have been trying to insert the parsed data as a string into mysql table in vain. This is what i am trying to do..... From the solution in the link …

Member Avatar for Amaina
0
613
Member Avatar for Amaina

I have an xml file that looks like this <?xml version="1.0" encoding="UTF-8" ?> <dates> <date> <Item Name="History" Type="List"> <Item Name="received" Type="Date">2015/12/18 00:00</Item> <Item Name="accepted" Type="Date">2016/03/31 00:00</Item> <Item Name="aheadofprint" Type="Date">2016/04/14 00:00</Item> <Item Name="entrez" Type="Date">2016/04/15 06:00</Item> <Item Name="pubmed" Type="Date">2016/04/15 06:00</Item> <Item Name="medline" Type="Date">2016/04/15 06:00</Item> </Item> </date> <date> <Item Name="History" Type="List"> <Item Name="epublish" …

Member Avatar for Amaina
0
852
Member Avatar for facarroll

I have a MySQL database which contains a text field which contains well formed xml. I want to export this data as an xml file named result_new.xml on the fly. I have made the tmp folder and have set the permissions on the folder to 0777. If I run this …

Member Avatar for facarroll
0
1K
Member Avatar for nevek

Hi I have a php script which creates an xml file //Select the Database mysql_select_db("personeelsbestand",$db); $result = mysql_query("select * from XMLAfdeling", $db); //Create SimpleXMLElement object $xml = new SimpleXMLElement('<xml/>'); //Add each column value a node of the XML object while($row = mysql_fetch_assoc($result)) { echo $row['Afdelingnaam']."\n"; $mydata = $xml->addChild('mydata'); $mydata->addChild('AfdelingID',$row['AfdelingID']); $mydata->addChild('Afdelingnaam',$row['Afdelingnaam']); …

Member Avatar for nevek
0
511
Member Avatar for Saran_1

Here is the CSV file that I am working with: `"A","B","C","D","E","F","G","H","I","J" "88",18,1,"<Req TID=""34"" ReqType=""MS""><IISO /><CID>2</CID><MemID>0000</MemID><MemPass /><RequestData><S>[REMOVED]</S><Na /><La /><Card>[REMOVED]</Card><Address /><HPhone /><Mail /></ReqData></Req>","<Response T=""3"" RequestType=""MS""><MS><Memb><PrivateMembers /><Ob>0-12-af</Ob><Locator /></Memb><S>[REMOVED]</S><CNum>[REMOVED]</CNum><FName /><LaName /><Address /><HPhone /><Email /><IISO /><MemID /><MemPass /><T /><CID /><T /></MS></Response>",0-JAN-10 12.00.02 AM,27-JUN-15 12.00.00 AM,"26",667,0 "22",22,1,"<Req TID=""45"" ReqType=""MS""><IISO /><CID>4</CID><MemID>0000</MemID><MemPass /><RequestData><S>[REMOVED]</S><Na /><La /><Card>[REMOVED]</Card><Address /><HPhone /><Mail /></ReqData></Req>","<Response …

0
184
Member Avatar for sing1006

I having a problem with the cloneNode tag problem. NodeList movielist = doc.getElementsByTagName("movie"); Element child = (Element)movielist.item(6); Element newNode = (Element)child.cloneNode(true); child.appendChild(newNode); newNode.setAttribute("id", "this is newnode"); code above will clone the whole set of thing. but the problem is it colne in wrong tag. i want some thing like this …

Member Avatar for sing1006
0
328
Member Avatar for Bartosz

I am having problem with maxOccurs in my code.. it is cauisng an error. Could anyone could aid me to avoid having error? <xs:simpleType name="nameType"> <xs:restriction base="string"> <xs:minLength value="1" /> <xs:maxLength value="20" /> </xs:restriction> </xs:simpleType> <xs:element name="information"> <xs:complexType> <xs:sequence> <xs:element name="personal" maxOccurs="10"> <xs:complexType> <xs:sequence> <xs:element type="nameType" name="name"/> <xs:element type="nameType" name="surname"/> …

Member Avatar for rubberman
0
228
Member Avatar for sam230

http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=4&cid=55505&apiKey=5q4gzx43g6ukcrq798z2hz75&customerSessionId=&locale=en_US&currencyCode=USD&xml=<HotelListRequest><city>new%20delhi</city><RoomGroup><Room><numberOfAdults>2</numberOfAdults><numberOfResults></numberOfResults></Room></RoomGroup></HotelListRequest> when i call api directly to browser i got right data in xml format. but when i call it through curl.. sometime i get data in json format or sometimes no data.. [CODE] $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://api.ean.com/ean-services/rs/hotel/v3/list?minorRev=4&cid=55505&apiKey=5q4gzx43g6ukcrq798z2hz75&customerSessionId=&locale=en_US&currencyCode=USD&xml=<HotelListRequest><city>new%20delhi</city><RoomGroup><Room><numberOfAdults>2</numberOfAdults><numberOfResults></numberOfResults></Room></RoomGroup></HotelListRequest>"); curl_setopt($ch, CURLOPT_FAILONERROR,1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_TIMEOUT, 15); $retValue = …

Member Avatar for Terrymol
0
914
Member Avatar for donz365

I am sorta new to MySQL and not 100% sure of what I can and can not do with it yet. I have an xml file with course information such as ReferenceNo. CourseName, CourseType, CourseLocation, and I want to load in into a database table that has column names such …

Member Avatar for diafol
0
2K
Member Avatar for computerbear

I am just in the first week of XML class. Never even heard of it before this class. I am getting this error message, and here is my output. I have tried in IE and Chrome. Same result. Can someone tell me what I am doing wrong? Thank you!!! Teddi …

Member Avatar for Squiva
0
295
Member Avatar for Simon_4

I am a bit new in XML and show elements/records on a website. So, here is my xml result. What and how is the easiest way to echo (in php) eg mp:title or <c:assets> <c:link rel="PT01" type="image/jpeg" href="http://ecx.images-amazon.com/images/I/41Qd6Z8OA8L.jpg"/> or price or so? any example would be nice... Cheers <c:searchResults xmlns:c="http://webstore.amazon.com/API" …

0
174
Member Avatar for Sathiyaraja

Hi All, Im new to xsl., In my implementation im converting a language code to a language value by lookup from a xml file. Input: <XML> <Name>shades</Name> <Languagecode>555</Languagecode> <XML> output: <XML> <Name>shades</Name> <Languagecode>hindi</Languagecode> <XML> Lookup XML table:(external file) <Languages> <Languagecode>555</Languagecode><Language>hindi</Language> <Languagecode>556</Languagecode><Language>tamil</Language> <Languagecode>558</Languagecode><Language>telugu</Language> <Languagecode>559</Languagecode><Language>malayalam</Language> <Languagecode>557</Languagecode><Language>bengali</Language> <Languagecode>554</Languagecode><Language>punjabi</Language> </Languages> I tried with Key …

Member Avatar for Sathiyaraja
0
4K
Member Avatar for t_thakar

I have a soap call which returns an object which has a xml string. an example is shown below: <?xml version="1.0" encoding="utf-16"?> <LoginResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <StatusCode>1</StatusCode> <StatusMessage>Login Successful</StatusMessage> <AuthKey>b2365767-ae42-1a44a6436575</AuthKey> </LoginResponse> I would like it to convert it into an associative array which will be similar to: array( "LoginResponse"=>array( "StatusCode"=>1, "StatusMessage"=>"Login …

Member Avatar for t_thakar
0
1K
Member Avatar for Dani

Hi ... so I'm not sure if I have PubSubHubbub set up correctly. I tried setting up subscribing to the feed in Feedly (which supposedly supports the protocol) and now I'm starting a new thread to see if it shows up ASAP. Here goes nothing ...

Member Avatar for Dani
0
249
Member Avatar for Anitha14

I want to select a node based on an attribute value. I am using C# program to derive on the attribute value which is stored in a variable. The below code returns null. How can I compare the attribute value against a variable? string posSecond = "test"; SelectSingleNode("//viewentries/viewentry[@position=posSecond]"); Thanks!

Member Avatar for Anitha14
0
576
Member Avatar for Anitha14

I want to identify xml nodes that does not have specific attribute. Below is the sample xml. I want to retrieve nodes that does have the "response" attribute. I found atricles that help identify node that has a specific attribute but not my requirement. <top node> <viewentry position=1 children = …

Member Avatar for Anitha14
0
276
Member Avatar for abaddon2031

I have just figured out how to search for the element that im looking for in a xml file but now when I run it the code loops through i know 3 times maybe even more. I want to know what im missing that would cause it to loop like …

Member Avatar for chriswelborn
0
256
Member Avatar for abaddon2031

I am workign with a xml file that contains the order information for a company. What i am tryign to do is see if the xml file have a scan code in it and if it does then to pull the order number so that it can be passed to …

Member Avatar for abaddon2031
0
295
Member Avatar for Tsukamoto Kyoko

I have this database in stored inside my Visual Studio Express 2013 for web. How can I use XSLT to turn into: <?xml version="1.0" encoding="utf-8" ?> <graph caption='Cashflow' subcaption='(Drag to zoom out)' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='0' decimalPrecision='0' showvalues='0' numdivlines='15' numVdivlines='15' yaxisminvalue='1000' yaxismaxvalue='1800' showVLineLabelBorder='1' numVisibleLabels='500' legendPosition='RIGHT' SCROLLBAR='Glow' btnSwitchToPinModeTitle='Compare Graphs'> <categories> <category name='1/1/2014' …

Member Avatar for xml_looser
0
363
Member Avatar for Big-D2xL

I'm doing a project for my class and one of the goals is to transform one XML to other using XSLT. I kinda managed to obtain the info within the original XML file but I don't know why I can't "print" the tag's. XML file (original): <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet …

Member Avatar for Big-D2xL
0
484
Member Avatar for george08.08

Is it possible to count the instances of a for-each boolean statement. for example, say you have patients in a hospital and certain criteria must be met to discharge them. 100(%0) health would equal a discharge, pseudo code would read something like this: totalHealth - HighTemperature + medication * recoveryPeriod …

Member Avatar for george08.08
0
617
Member Avatar for flebber

What I am trying to acheive is to parse an xml file break it up into useful components and push it to a multi table SQL database. But I cannot get off the ground in the basics. Take an xml file like this [Click Here](http://old.racingnsw.com.au/Site/_content/racebooks/20140513HAWK0.xml) Which at the start is …

Member Avatar for Gribouillis
0
1K
Member Avatar for george08.08

I am trying to get my head around the functions etc in xslt with xml. I have made a dummy xml file <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="books.xslt"?> <books> <book> <title>Hello Dolly</title> <author>John Thumb</author> <readers> <young_readers>17</young_readers> <older_readers>23</older_readers> <total_readers>40</total_readers> </readers> </book> <book> <title>Goodbye John Thumb</title> <author>Dolly Smith</author> <readers> <young_readers>12</young_readers> <older_readers>3</older_readers> <total_readers>15</total_readers> …

Member Avatar for george08.08
0
277
Member Avatar for tony75

Hi I’m working right now with computer forensics. I have an xml file which I have saved from Process Monitor . The file look like <?xml version="1.0" encoding="UTF-8"?> <Company>Sysinternals - www.sysinternals.com</Company> <module> <Timestamp>130412795960224800</Timestamp> <BaseAddress>0x6de80000</BaseAddress> <Size>24576</Size> <Path>C:\Windows\system32\Riched32.dll</Path> <Version>6.1.7600.16385 (win7_rtm.090713-1255)</Version> <Company>Microsoft Corporation</Company> <Description>Wrapper Dll for Richedit 1.0</Description> </module> <module> <Timestamp>130412795960224800</Timestamp> <BaseAddress>0x6f3b0000</BaseAddress> <Size>65536</Size> …

Member Avatar for tony75
0
493

The End.