Search Results

Search found 25798 results on 1032 pages for 'android xml'.

Page 114/1032 | < Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >

  • How to get an xml file when running mstest

    - by devlife
    I have a class which loads an xml file using the following: Path.Combine( AppDomain.CurrentDomain.BaseDirectory, "Xml", documentName ); The documents that are being loaded are set to copy to the output directory. However, when I run mstest the xml file is not being copied to the BaseDirectory. Does anyone have any idea how I can accomplish this?

    Read the article

  • Create xml document in java applet.

    - by zproxy
    If I try to create a new xml document in a java applet by this code: http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/DocumentBuilderFactory.html#newInstance() DocumentBuilderFactory.newInstance(); I will get this error: Java Plug-in 1.6.0_19 Using JRE version 1.6.0_19-b04 Java HotSpot(TM) Client VM javax.xml.parsers.FactoryConfigurationError: Provider <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> not found at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) I do not care about DTD's. Why is it looking for it? How am I supposed to create a xml document in java applets? How can I make it work? The enclosing html document looks like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Loading...</title> </head> Can some comment this thread? The problem was with the entity resolver, which points to the w3c.org web site. The access to the reference DTDs on this site has been restricted for application use. The solution was to implement my own entity resolver. Related: http://forums.sun.com/thread.jspa?threadID=515055 http://stackoverflow.com/questions/1016286/org-apache-xerces-jaxp-saxparserfactoryimpl-not-found-when-importing-gears-api-in http://java.itags.org/java-desktop/4839/

    Read the article

  • Can't parse XML effectively using Python

    - by Harshit Sharma
    import urllib import xml.etree.ElementTree as ET def getWeather(city): #create google weather api url url = "http://www.google.com/ig/api?weather=" + urllib.quote(city) try: # open google weather api url f = urllib.urlopen(url) except: # if there was an error opening the url, return return "Error opening url" # read contents to a string s = f.read() tree=ET.parse(s) current= tree.find("current_condition/condition") condition_data = current.get("data") weather = condition_data if weather == "<?xml version=": return "Invalid city" #return the weather condition #return weather def main(): while True: city = raw_input("Give me a city: ") weather = getWeather(city) print(weather) if __name__ == "__main__": main() gives error , I actually wanted to find values from google weather xml site tags

    Read the article

  • Is XML a good logic to load data??

    - by Mat
    Hi stack, i'm working on an app that loads some data from xml file from internet. Is this a good way to develop iPhone apps??...I think xml is more light than SQlite database... Basically my logic is: 1 - Parsing Xml file from internet to retrive the data 2 - Load data on device Security?..other stuff??.. Thanks Mat

    Read the article

  • Why can't I access elements inside an XML file with XPath in XML::LibXML?

    - by John
    I have an XML file, part of which looks like this: <wave waveID="1"> <well wellID="1" wellName="A1"> <oneDataSet> <rawData>0.1123975676</rawData> </oneDataSet> </well> ... more wellID's and rawData continues here... I am trying to parse the file with Perl's libXML and output the wellName and the rawData using the following: use XML::LibXML; my $parser = XML::LibXML->new(); my $doc = $parser->parse_file('/Users/johncumbers/Temp/1_12-18-09-111823.orig.xml'); my $xc = XML::LibXML::XPathContext->new( $doc->documentElement() ); $xc->registerNs('ns', 'http://moleculardevices.com/microplateML'); my @n = $xc->findnodes('//ns:wave[@waveID="1"]'); #xc is xpathContent # should find a tree from the node representing everything beneath the waveID 1 foreach $nod (@n) { my @c = $nod->findnodes('//rawData'); #element inside the tree. print @c; } It is not printing out anything right now and I think I have a problem with my Xpath statements. Please can you help me fix it, or can you show me how to trouble shoot the xpath statements? Thanks.

    Read the article

  • Convert CSV file to XML

    - by Soeren
    I need to Convert a CSV into an XML document. The examples I have seen so far, all show how to do this with a fixed number of columns in the CSV. I have this so far, using LINQ: String[] File = File.ReadAllLines(@"C:\text.csv"); String xml = ""; XElement top = new XElement("TopElement", from items in File let fields = items.Split(';') select new XElement("Item", new XElement("Column1", fields[0]), new XElement("Column2", fields[1]), new XElement("Column3", fields[2]), new XElement("Column4", fields[3]), new XElement("Column5", fields[4]) ) ); File.WriteAllText(@"C:\xmlout.xml", xml + top.ToString()); This is for a fixed amount of columns, but my .CSV has a different number of columns on each line. How would you fit some sort of loop into this, depending on how many words (columns) there are in each line of the .CSV? Thnx

    Read the article

  • Dump XML Posts from 'php://input' to file

    - by Mikey1980
    I'm trying to write a parser for a xml postback listener, but can't seem to get it to dump the xml for a sample. The API support guy told me to use 'DOMDocument', maybe 'SimpleXML'? Anyways here's the code: (thanks!) <?php $xml_document = file_get_contents('php://input'); $doc = new DOMDocument(); $doc->loadXML($xml_document); $doc->save("test2/".time().".sample.xml").".xml"); ?>

    Read the article

  • How can Perl's XML::Simple ignore HTML embedded in XML?

    - by Miriam Raphael Roberts
    I have an XML file that I am pulling from the web and parsing. One of the items in the XML is a 'content' value that has HTML. I am using XML::Simple::XMLin to parse the file like so: $xml= eval { $data->XMLin($xmldata, forcearray => 1, suppressempty=> +'') }; When I use Data::Dumper to dump the hash, I discovered that SimpleXML is parsing the HTML into the hash tree: 'content' = { 'div' = [ { 'xmlns' = 'http://www.w3.org/1999/xhtml', 'p' = [ { 'a' = [ { 'href' = 'http://miamiherald.typepad.com/.a/6a00d83451b26169e20133ec6f4491970b-pi', 'style' = 'FLOAT: left', 'img' = [ etc..... This is not what I want. I want to just grab content inside of this entry. How do I do this?

    Read the article

  • android 2.2 google map error

    - by shenbryant
    I used google.map api to develop a project which works well on android 2.1. But when I run the same project on android 2.2, it encountered some errors. The shown errors are " -- AndroidRuntime FATAL EXCEPTION:main -- AndroidRuntime java.lang.NoClassDefFoundError:android.net.NetworkConnectivityListener -- AndroidRuntime at com.google.android.maps.MapActivity.onCreate(MapActivity.java:199) " I don't know where is the problem? Can anyone help me? I will apreciate it very much!

    Read the article

  • Help Modifying Generic REST Helper PHP Example Code to Support XML DOM

    - by Jennifer Baker
    Hi! I found this example PHP source code at HTTP POST from PHP, without cURL I need some help modifying the example PHP source to support XML DOM for manipulating a REST API. I thought that if I update the CASE statement for the XML section below from $r = simplexml_load_string($res); to $r = new DOMDocument(); $r->load($res); that it would work but it doesn't. :( Any help would be appreciated. function rest_helper($url, $params = null, $verb = 'GET', $format = 'xml') { $cparams = array( 'http' => array( 'method' => $verb, 'ignore_errors' => true ) ); if ($params !== null) { $params = http_build_query($params); if ($verb == 'POST') { $cparams['http']['content'] = $params; } else { $url .= '?' . $params; } } $context = stream_context_create($cparams); $fp = fopen($url, 'rb', false, $context); if (!$fp) { $res = false; } else { // If you're trying to troubleshoot problems, try uncommenting the // next two lines; it will show you the HTTP response headers across // all the redirects: // $meta = stream_get_meta_data($fp); // var_dump($meta['wrapper_data']); $res = stream_get_contents($fp); } if ($res === false) { throw new Exception("$verb $url failed: $php_errormsg"); } switch ($format) { case 'json': $r = json_decode($res); if ($r === null) { throw new Exception("failed to decode $res as json"); } return $r; case 'xml': $r = simplexml_load_string($res); if ($r === null) { throw new Exception("failed to decode $res as xml"); } return $r; } return $res; }

    Read the article

  • populate textboxs with xml node attributes

    - by Doug
    I have Data.xml: <?xml version="1.0" encoding="utf-8" ?> <data> <album> <slide title="Autum Leaves" description="Leaves from the fall of 1986" source="images/Autumn Leaves.jpg" thumbnail="images/Autumn Leaves_thumb.jpg" /> <slide title="Creek" description="Creek in Alaska" source="images/Creek.jpg" thumbnail="images/Creek_thumb.jpg" /> </album> </data> I'd like to be able to edit the attributes of each Slide node via GridView (that has a "Select" column added.) And so far I have: protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { int selectedIndex = GridView1.SelectedIndex; LoadXmlData(selectedIndex); } private void LoadXmlData(int selectedIndex) { XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(MapPath(@"..\photo_gallery\Data.xml")); XmlNodeList nodelist = xmldoc.DocumentElement.ChildNodes; XmlNode xmlnode = nodelist.Item(selectedIndex); titleTextBox.Text = xmlnode.Attributes["title"].InnerText; descriptionTextBox.Text = xmlnode.Attributes["description"].InnerText; sourceTextBox.Text = xmlnode.Attributes["source"].InnerText; thumbTextBox.Text = xmlnode.Attributes["thumbnail"].InnerText; The code for LoadXmlData is just a guess on my part - I'm new to working with xml in this way. I'd like have the user to slected the row from the gridview, then populate a set of text boxes with each slide attributed for updating back to the Data.xml file. The error I'm getting is "Object reference not set to an instance of an object" at the line: titleTextBox.Text = xmlnode.Attributes["@title"].InnerText; - so I'm not reaching the attribute "title" of the slide node. Thanks for any ideas you may have.

    Read the article

  • starting with android

    - by Woland
    I am considering to start writing apps for android. Could some-one post list with all tools needed to start coding. My programming skills by language are C# - excellent Java - moderate c/c++ - beginner I have heard something about Mono for android, whats the status of it? is it any good? Also it would be helpful to hear how Java performs on android. Any other points and issues regarding the android platform are also welcomed.

    Read the article

  • can't insert xml dml expression as a string

    - by 81967
    Here is the code below that would explain you the problem... I create a table below with an xml column and declare a variable, initialize it and Insert the Value into the xml column, create table CustomerInfo (XmlConfigInfo xml) declare @StrTemp nvarchar(2000) set @StrTemp = '<Test></Test>' insert into [CustomerInfo](XmlConfigInfo) values (@StrTemp) Then comes the part of the question,, if I write this... update [CustomerInfo] set XmlConfigInfo.modify('insert <Info></Info> into (//Test)[1]') -- Works Fine!!! but when I try this, set @StrTemp = 'insert <Info></Info> into (//Test)[1]' update [CustomerInfo] set XmlConfigInfo.modify(@StrTemp) -- Doesn't Work!!! and throws an error The argument 1 of the xml data type method "modify" must be a string literal. is there a way around for this one? I tried this, but it is not working :(

    Read the article

  • Spec. for JUnit XML Output

    - by Gilad Naor
    Where can I find the specification of JUnit's XML output. My goal is to write a UnitTest++ XML reporter which produced JUnit like output. See: "Unable to get hudson to parse JUnit test output XML" and "http://stackoverflow.com/questions/411218/hudson-c-and-unittest"

    Read the article

  • main.out.xml error

    - by husainsn
    Hello I installed Eclipse and Android ADT. When I create android project and try to run, I get following on main.out.xml file: This document is empty. Right click here to insert content However, main.xml file has xml data for layout. Please help what I need to do after right clicking. Thanks

    Read the article

  • Read XML with PHP

    - by sea_1987
    I am trying to check a field in some XML that is returned from an outside. The XML is returned in a variable call $out and when you view the source of the page you get a XML output of the following, <?xml version="1.0" encoding="UTF-8"?> <ResponseBlock Live="FALSE" Version="3.51"> <Response Type="AUTH"> <OperationResponse> <TransactionReference>23-9-1334895</TransactionReference> <TransactionCompletedTimestamp>2010-04-30 15:59:05</TransactionCompletedTimestamp> <AuthCode>AUTH CODE:TEST</AuthCode> <TransactionVerifier>AlaUOS1MOnN/iwc5s2WPDm5ggrCLwesUnHs9h+W0N3CRaln2W6lh+6dtaRFFhLdwfnw6y7lRemyJUYl9a3dpWfzORE6DaZkFMb+dIb0Ne1UxjFEJkrEtjzx/i8KSayrIBrT/yGZOoOT42EZ9loc+UkdGk/pqYvj8bZztvgBNo2Ak=</TransactionVerifier> <Result>1</Result> <SettleStatus>0</SettleStatus> <SecurityResponseSecurityCode>1</SecurityResponseSecurityCode> <SecurityResponsePostCode>1</SecurityResponsePostCode> <SecurityResponseAddress>1</SecurityResponseAddress> </OperationResponse> <Order> <OrderInformation>This is a test order</OrderInformation> <OrderReference>Order0001</OrderReference> </Order> </Response> </ResponseBlock> I want check what value is in the 'Result' field. I am unsure how to access the information using PHP, so far I have, $xml = simplexml_load_string($out); Many Thanks

    Read the article

  • Filtering most out of XML with XSL?

    - by Gnudiff
    I need to transform a lot of XML files (Fedora export) into a different kind of XML. Trying to do it with XSL stylesheets and checking with the msxsl transformer. Supposedly I have xml file like this (assuming there are actually other nodes inside AAA, OBJ, amd all other nodes), Source.XML: <DOC> <AAA> <STUFF>example</STUFF> <OBJ> <OBJVERS id="A1" CREATED="2008-02-18T13:28:08.245Z"/> <OBJVERS id="A2" CREATED="2008-02-19T10:42:41.965Z"/> <OBJVERS id="A13" CREATED="2009-03-16T12:43:11.703Z"/> </OBJ> </AAA> <FFF/> <GGG/> <DDD> <FILE /> </DDD> </DOC> Which I need to look something like this (Target.XML): <MYOBJ> <ELEM>contents of OBJVERS with the biggest id OR creation date (whichever is easier to do) go here</ELEM> <IMAGE> contents of <FILE> node go here</IMAGE> </MYOBJ> The main problem that I have is that since I am new to XSL (and for this particular task do not have enough time to learn it properly) is that I can't understand how to tell XSL processor not to process anything else, I keep getting output from , for example. Update: basically, I solved this problem meanwhile. I will post my own answer and close the question. Update2: OK, Andrew's answer works, too, so I am just accepting it. :)

    Read the article

  • How to run Android instrumentation tests from the command line (in Kubuntu)?

    - by KK
    We are able to run instrumentation tests of Android from the command line on Windows by launching: adb shell am instrument -w <package.test>/android.test.InstrumentationTestRunner This gives us good results. Using the same architecture, we are unable to run the same in Kubuntu. We have the same setup in Kubuntu. Can someone let us know, if there are packages with same name.. Then what package will the adb shell point? How will the emulator connect with adb shell from cmd line? DO we need to do any changes to do so in Kubuntu ?

    Read the article

  • change extension obfuscate XML file contents

    - by FFish
    I have SlideShowPro, a Flash photo app that loads an XML file with the paths to the images. Now I don't want people to go sniff in the XML file to get to the images. I tried changing the file images.xml to spacer.gif and it seems to work fine. But I would like to know if I would run into any problems changing the extension. btw already used a few techniques to make the images not so accessible, I know there is no bulletproof solution. Obfuscating the XML file is just another trick..

    Read the article

  • xml file reading

    - by Dilse Naaz
    How to read an xml file in silverlight using webclient. I have one task, in this the xml file that i stored in my machine will read and the content od the xml file will display on a data grid. how it will be done?

    Read the article

  • Sum value of XML attributes using PowerShell 2.0

    - by Yooakim
    I have a directory with XML files. I quickly want to go through them and sum upp the value stored in one attribute. I have figured out how to fidn the nodes I am interested in. For example: (Select-Xml -Path .\*.xml -XPath "//*[@Attribue = 'valueImlookingfor']").Count This command gives me the count of elements in all of the XML files in the current directory which has the value "valueImlookingfor" in the "Attribue". I want to sum up all the values of the "Attribute", not count them. What would be the best way to do this in PowerShell? I am new to PowerShell so this may be trivial but un-known to me... All tips are much appreciated :-)

    Read the article

  • admob orientation problem in android

    - by Aswan
    Hi folks my application integrated with admob ads.when i change the orientation it should fit the screen depends on orientation.portrait mode it is working fine when i changed to landscape mode what ad size i am getting in portrait mode same size of ad displayed in landscape mode the following i am adding in layout page <com.admob.android.ads.AdView android:id="@+id/ad" android:layout_width="fill_parent" android:layout_height="wrap_content" myapp:backgroundColor="#000000" myapp:primaryTextColor="#FFFFFF" myapp:secondaryTextColor="#CCCCCC" />

    Read the article

  • Sencha Tocuh XML Reader Problem

    - by Ploetzeneder
    Hi, i am student and cannot afford the premium support, so my question here: I have quite a simple XML and it gives me the following Error: http://img33.imageshack.us/i/screenprn.png/ Ext.regModel('User', { fields: ['id', 'name', 'email'] }); var store = new Ext.data.Store({ model: 'User', autoLoad:true, proxy: { type: 'ajax', url : 'ajax/user.xml', reader: { type : 'xml', model: 'User', record: 'user' } } });

    Read the article

< Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >