how to extrapolate information from XML file in php
im using file_get_conents to retrieve an XML file. Lets say the xml file looks like this <tag1> <subtag1>Info</subtag2> </tag1> How would i go about retrieving Info from that xml file? ...
im using file_get_conents to retrieve an XML file. Lets say the xml file looks like this <tag1> <subtag1>Info</subtag2> </tag1> How would i go about retrieving Info from that xml file? ...
I actually want to achieve the following description This is the table argument I want to pass to the server <items> <item category="cats">1</item> <item category="dogs">2</item> </items> SELECT * FROM Item WHERE Item.Category = <one of the items in the XML list> AND Item.ReferenceId = <the corresponding value of ...
I've got an XML config file with some really long strings. Generally, I format my source files, etc. so that they can be read without scrolling. I'd like to do the same to this config file. Is there a way to split the string across more than one line? Hopefully, what I'm asking for is obvious but a picture says a thousand words so, e...
Hello, I have a problem that I cannot understand I am trying to make my webservice work from a class. I try'd to echo the xml from some function in a controllerclass, but that diddn't work. So, I moved the xml around to a place where it did work. That means that I placed it before the loader function is called. That's where it still w...
I still haven't really used JSON in a real world project - I pretty much always rely on XML. ...
SimpleXML seems ok, but one thing that's annoying is whenever assigning/storing a value you have to typecast it - this really is a tad annoying. DOM is ok but I really like the flexibility of XPath, sometimes DOM can be a tad too much writing-wise. I really like the selector implementation in jQuery, and the flexibility. I came across ...
I can't find an answer on their website. Do you have any idea if HtmlCleaner is thread safe or not? I have a multiple threads that need to use it but I don't know if I can safetly reuse an instance of the HtmlCleaner object. Have you ever used it? any idea? ...
Hi Guys, I saw this post does anyone knows about some C# framework doing similar like dom4j do? I need to build up XMLs using XPATHs. Cheers, DD ...
Hello, i have a problem with my linq to xml query var q = (from f in xmlLang.Element("lang").Elements("page") where (string)f.Attribute("id") == "home" select f.Element(LangElement).Value.ToString()).Take(1).SingleOrDefault(); The xml looks like this, <lang> <page id="home"> <hello>Hello!</hello>...
I want to make a request to a SOAP Web Service but I don't want to install any gems. Is there any way to just make the request using plain XML? I think it's trivial but there might be something I've missed, because all implementations/tutorials were using a gem. I think that the SOAP response, can be handled also as a XML response rig...
Hello, my question is how I can send clean xml from this class. It is simplified, so there is the least off trouble that could have been caused by other things. The problem now is that the error says that the xml declaration should occur at the top off the document. What is the right way to avoid this kind off errors? Is there some php...
Basically, I have my own custom ribbon in a .dotm. I also have a 3rd-party ribbon with some buttons/functionality I would like to reference from my custom ribbon. I can access the XML for this 3rd-party ribbon. So, is it possible to reference this 3rd-party XML from my custom ribbon, so that I can have one of the 3rd-party's buttons on m...
Hello i have the follow problem. I have e XML file and i know the value of "uniquename=value2". I want extract the value of URL. <set uniquename="value1"> <items> <item> <units> ... </units> </item> <item> <units> ... <url>http://www.something</url> ... </unit...
I want to read an XML file that has a schema declaration in it. And that's all I want to do, read it. I don't care if it's valid, but I want it to be well formed. The problem is that the reader is trying to read the schema file, and failing. I don't want it to even try. I've tried disabling validation, but it still insists on trying ...
I need to be able to store data for a php application in a file. I need to be able to do this without any sort of external dependencies other than PHP itself. Here are the requirements I have: Settings will not be updated/added/removed very often. So updating of settings does not have to be very efficient. However, I do want to be abl...
<?xml version="1.0" encoding="UTF-8"?> <Country> <States> <County> <popularity>39</popularity> <name>Orange</name> <id>13811</id> <url>http://www.url.gov</url> <overview>Orange County Overview</overview> <Cities> <City name="City #1" size="big" population="33333"/> <City nam...
Im trying to read an RSS feed from Flickr but it has some nodes which are not readable by Simple XML (media:thumbnail, author flickr:profile, ...) How do I get round this? Im trying to get the thumbnail by the way. P.S. My head hurts when I look at the documentation for the DOM. So I'd like to avoid it as I dont want to learn. ...
I have an automatically-generated XML file that is supposed to be encoded with UTF-8. For the most part, the encoding is correct. However, there are some few characters that are not encoded properly. When viewing the file in Emacs, I get \370, \351. Is there a way to detect their characters programatically? I prefer solutions using ...
I have code using XmlSerializer to serialize/deserialize a data structure for persistance. I've read and heard in several places here on StackOverflow that XmlSerializer is one or more of: Bad Poorly supported/implemented Possibly won't be supported into the future My question is two-fold; is any of the above true, and if so, what al...
I've only used XML RPC and I haven't really delved into SOAP but I'm trying to find a good comprehensive guide, with real world examples or even a walkthrough of some minimal REST application. I'm most comfortable with Python/PHP. ...