Search Results

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

Page 119/1032 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • How to ignore the validation of Unknown tags ?

    - by infant programmer
    One more challenge to the XSD capability,I have been sending XML files by my clients, which will be having 0 or more undefined or [call] unexpected tags (May appear in hierarchy). Well they are redundant tags for me .. so I have got to ignore their presence, but along with them there are some set of tags which are required to be validated. This is a sample XML: <root> <undefined_1>one</undefined_1> <undefined_2>two</undefined_2> <node>to_be_validated</node> <undefined_3>two</undefined_3> <undefined_4>two</undefined_4> </root> And the XSD I tried with: <xs:element name="root" type="root"></xs:element> <xs:complexType name="root"> <xs:sequence> <xs:any maxOccurs="2" minOccurs="0"/> <xs:element name="node" type="xs:string"/> <xs:any maxOccurs="2" minOccurs="0"/> </xs:sequence> </xs:complexType XSD doesn't allow this, due to certain reasons. The above mentioned example is just a sample. The practical XML comes with the complex hierarchy of XML tags .. Kindly let me know if you can get a hack of it. By the way, The alternative solution is to insert XSL-transformation, before validation process. Well, I am avoiding it because I need to change the .Net code which triggers validation process, which is supported at the least by my company.

    Read the article

  • How to run a widget inside of an activity in Android?

    - by user220755
    I have a widget built to give the user the chance to choose the date (I did not build it, I am building on top of an open source software). Now, I need to display this widget inside of a class that extends the activity class in Android. Let me show some code. Let us say this is the activity class: public class RandomClass extends Activity { public void onCreate(Bundle savedInstanceState) { // I want to run the widget here when the class is created // (the activity is created) } } The widget i want to run is a widget that lets the user choose the date. I know I code use one of Android's activities but I need to build on top of the code so I have to run it inside of the activity class I created. Sorry if this is not clear, ask any questions and i will be more than glad to answer them and clarify.

    Read the article

  • Testcase with multitouch on Android?

    - by makke
    The TouchUtils class in the android documentation has functions like drag() [http://developer.android.com/intl/de/reference/android/test/TouchUtils.html#drag(android.test.InstrumentationTestCase,%20float,%20float,%20float,%20float,%20int)], but they do not support multi touch gestures, like a two finger swipe. Looking at the MotionEvent.obtain() methods, there does not seem to be any way of invoking a "virtual" multi touch event from a testcase. Anyone has got it working?

    Read the article

  • Error message: [2011-11-18 10:40:31 - Notepadv1] AndroidManifest.xml file missing?

    - by user1054319
    I am trying to do the notepad tutorials and keep getting this error. I am following all the directions on the website. I have tried the "Fix Project Properties" via "Android Tools" but this does nothing to fix the problem. I have put the extracted folder for the tutorial in various locations - this did nothing. I am trying to create a new Android project from source with 2.1... I have been told to uninstall Eclipse. Any help would be appreciated. Thank you

    Read the article

  • Write Mysql tables to XML : Security Issue

    - by jasmine
    I want to make a news portal(php) with minimum mysql force. :create a cron, fetch data from mysql and write to a php file . (I dont know is it right way) But Can I use xml instead of php file? Write mysql data to xml. Is this a secure way? What is the best way? XML or php file? Thanks in advance

    Read the article

  • android can not find a target

    - by EthanZ6174
    i am using eclipse with android plugin and sdk, but i can not create a virtual device due to there is no target, and when I execute this: $ ./android list targets Available Android targets: what should i do? and.............. when i try to install the available packages in eclipse avd manage it comes to: Downloading SDK Platform Android 2.0 API5, revision1 SSL peer shutdown incorrectly....

    Read the article

  • Unfortunately App stopped when destroying SupportMapFragment

    - by user1408341
    I have the following problem. I have three fragments which are hosted in a TabHost. When I'm working with the app everything works fine. Now I like to end the app when the user hits the back button. Instead of terminating without errors I get the message Unfortunately App stopped. Then I said to myself something is wrong with the onDestroy() method of the FragmentActivity or with the onDestroyView method() of the Fragment. The problem is I cannot debug the point where the app crash. I get only the error:Fatal signal 11 (SIGSEGV). I then removed one by one each Fragment to identify which fragment causes the error. I could identify the fragment that I named BasicMapFragment. Something is wrong there. The code: public class BasicMapFragment extends SupportMapFragment implements LocationListener { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = super.onCreateView(inflater, container, savedInstanceState); //removeAllMarkers(); //setupGps(); //setupMap(); //setupMarkersFromModel(); //registerListeners(); return view; } } I commented out all my self written code to isolate the place where the error occurs. @Override public void onDestroy() { Log.d("ch.xxx.fragment.BasiceMapFragment", "On destroy called"); super.onDestroy(); } public void onDestroyView() { Log.d("ch.xxx.fragment.BasiceMapFragment", "On destroy view called"); super.onDestroyView(); } When I press the back button now the onDestroy() method of my FragmentActivity is first called like expected. Then the onDestroyView method is called on my BasicMapFragment class. At the end the onDestroy method is called - and then the application crash. Here is my layout file: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <fragment android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.SupportMapFragment"/> </FrameLayout> Resume: - Map is showed - I can work with the app. - When I leave out the BasicMapFragment the app finish without error. - When I add the BasicMapFragment the app returns an error when I press the back button Is there something that I have forgot to implement? Have somebody had the same trouble?

    Read the article

  • Serializing a class containing a custom class

    - by Netfangled
    I want to serialize an object as xml that contains other custom classes. From what I understand (I've been reading MSDN and SO mostly), the XmlSerializer doesn't take this into account. This is the line that's confusing me: XML serialization serializes only the public fields and property values of an object into an XML stream. XML serialization does not include type information. For example, if you have a Book object that exists in the Library namespace, there is no guarantee that it will be deserialized into an object of the same type. Taken from MSDN, here For example, I want to serialize an object of type Order, but it contains a list of Products, and each one contains an object of type Category: class Order { List<Product> products; } class Product { Category type; } class Category { string name; string description; } And I want my Order object to be serialized like so: <Order> <Product> <Category Name=""> <Description></Description> </Category> </Product> <Product> <Category Name=""> <Description></Description> </Category> </Product> <Order> Does the XmlSerializer already do this? If not, is there another class that does or do I have to define the serialization process myself?

    Read the article

  • Nokogiri extract data from xml

    - by Awea
    Hi guys, i try to extract data from a xml in rails application with the Nokogiri gem, the xml : <item> <description> <img src="something" title="anothething"> <p>text, bla bla...</p> </description> </item> Actually i do something like this to extract data from the xml : def test_content @return = Array.new site = 'http://www.les-encens.com/modules/feeder/rss.php?id_category=0' @doc = Nokogiri::XML(open(site, "UserAgent" => "Ruby-OpenURI")) @doc.xpath("//item").each do |n| @return << [ n.xpath('description') ] end end Could you show me how extract just the src attribute from the img tag ?

    Read the article

  • Update Empty XML Tag in SQL Server

    - by monO
    I'm trying to update an empty XML Tag in my Xml string on sql server; it says the row is updated when i run the following script, but when I view the XML; nothing has changed: Declare @newValue varchar(100) select @newValue = '01' update dbo.UploadReport set XmlTest.insert('replace value of (/CodeFiveReport/Owner/AgencyID/text())[1] with sql:variable("@newValue")') where id = 'myId' The xml after still appears as this in the databse <AgencyID /> What am I doing wrong? I've tried @AgencyID without the text() at the end and still no avail...

    Read the article

  • Sorting the output from XmlSerializer in C#

    - by prosseek
    In this post, I could get an XML file generated based on C# class. Can I reorder the XML elements based on its element? My code uses var ser = new XmlSerializer(typeof(Module)); ser.Serialize(WriteFileStream, report, ns); WriteFileStream.Close(); to get the XML file, but I need to have the XML file sorted based on a BlocksCovered variable. public class ClassInfo { public string ClassName; public int BlocksCovered; public int BlocksNotCovered; public double CoverageRate; public ClassInfo() {} public ClassInfo(string ClassName, int BlocksCovered, int BlocksNotCovered, double CoverageRate) { this.ClassName = ClassName; this.BlocksCovered = BlocksCovered; this.BlocksNotCovered = BlocksNotCovered; this.CoverageRate = CoverageRate; } } [XmlRoot("Module")] public class Module { [XmlElement("Class")] public List<ClassInfo> ClassInfoList; public int BlocksCovered; public int BlocksNotCovered; public string moduleName; public Module() { ClassInfoList = new List<ClassInfo>(); BlocksCovered = 0; BlocksNotCovered = 0; moduleName = ""; } } Module report = new Module(); ... TextWriter WriteFileStream = new StreamWriter(xmlFileName); XmlSerializerNamespaces ns = new XmlSerializerNamespaces(); ns.Add("", ""); var ser = new XmlSerializer(typeof(Module)); ser.Serialize(WriteFileStream, report, ns); WriteFileStream.Close();

    Read the article

  • Export XML with only one MySQL request ?

    - by mere-teresa
    I want to export in XML format some data from 7 tables (MySQL database), and then I want to import in another database. And I have a update or insert rule for data. I already have a SQL query retrieving all data, with JOINs on my 7 tables. But...when I try to put data in XML format, I reach a limit. My PHP loop can catch each row, but I would like to benefit from hierachical structure of the XML, and all I have are rows with the same data repeated. It is better to query once and to construct the XML tree in PHP or to query each time I want access to a lower level ?

    Read the article

  • Traverse a XML using Recursive function

    - by Kaja
    How can I traverse (read all the nodes in order) a XML document using recursive functions in c#? What I want is to read all the nodes in xml (which has attributes) and print them in the same structure as xml (but without Node Localname) Thanks

    Read the article

  • XML Database in C#.net

    - by rookieinfotech
    I am developing a WPF client program for some websites. It uses XML database. I am new to XML. Would someone please explain how to create,append(Most important),edit,read&encrypt XML file. It is a big question,i know . But, it is urgent.Have to complete the work ASAP. Searched in the internet, not getting correct info.

    Read the article

  • From Java/C++ to XML

    - by Greenhouse Gases
    I know Java and C++ but am looking to get in to XML. I don't want to waste time reading over the basics of programming in a book, so has anyone any recommendations for resources for learning XML that assume a knowledge of programming already, or even better highlight how to switch from Java/C++ to XML ie. main differences etcs.

    Read the article

  • Read [for xml auto, elements] into DataTable in ADO.NET

    - by ihorko
    Hello All! I have MS SQL Server stored procedure that returns XML (it uses SELECT with for xml auto, elements) I tried read it into DataTable: DataTable retTable = new DataTable(); SqlCommand comm = new SqlCommand("exec MySP", connection); SqlDataAdapter da = new SqlDataAdapter(comm); connection.Open(); da.Fill(retTable); but retTable contains 12 rows with separated full xml thar SQL Server returns. How can I read that XML from DB into DataTable object? Thanks!

    Read the article

  • open text file in android emulator

    - by Karthick
    How to open a text file in android.I am using android 1.5 emulator and eclipse ide.I try to push files to the device emulator.In Eclipse ide android file explorer has the text file and image files in the sdcard.In the Emulator Image files are in the Gallery.How can i see the text file in the android emulator.

    Read the article

  • Load php file wth xml header

    - by John Smith
    I have a php file with an xml header and xml code, named test.php. How do I load this file as an xml? The following doesn't work: $xml = simplexml_load_file('test.php'); echo $xml; I just get a white page. The test file is saved as php, as it's dynamic. It's loading data from the tradedoubler api. The xml looks something like this: <voucherList> <voucher> <id>115</id> <programId>111</programId> <programName>Program 111</programName> <code>AF30C5</code> <updateDate>1332422674941</updateDate> <startDate>1332370800000</startDate> <endDate>1363906800000</endDate> <title>Voucher number one</title> <shortDescription>Short description of the voucher.</shortDescription> <description>This is a long version of the voucher description.</description> <voucherTypeId>1</voucherTypeId> <defaultTrackUri>http://clk.tradedoubler.com/click?a(222)p(111)ttid(13)</defaultTrackUri> <siteSpecific>True</siteSpecific> </voucher> <voucher> <id>116</id> <programId>111</programId> <programName>Program 111</programName> <code>F90Z4F</code> <updateDate>1332423212631</updateDate> <startDate>1332370800000</startDate> <endDate>1363906800000</endDate> <title>The second voucher</title> <shortDescription>Short description of the voucher.</shortDescription> <description>This is a long version of the voucher description.</description> <voucherTypeId>1</voucherTypeId> <defaultTrackUri>http://clk.tradedoubler.com/click?a(222)p(111)ttid(13)url(http://www.example.com/product?id=123)</defaultTrackUri> <siteSpecific>False</siteSpecific> <landingUrl>http://www.example.com/product?id=123</landingUrl> </voucher> </voucherList>

    Read the article

  • Obtaining XML from U.S. Postal Service (USPS) rate calculator API with PHP

    - by Chris F
    hoping somebody here can help me. I'm attempting to pull an XML page from the U.S. Postal Service (USPS) rate calculator, using PHP. Here is the code I am using (with my API login and password replaced of course): <? $api = "http://production.shippingapis.com/ShippingAPI.dll?API=RateV4&XML=<RateV4Request ". "USERID=\"MYUSERID\" PASSWORD=\"MYPASSWORD\"><Revision/><Package ID=\"1ST\">". "<Service>FIRST CLASS</Service><FirstClassMailType>PARCEL</FirstClassMailType>". "<ZipOrigination>12345</ZipOrigination><ZipDestination>54321</ZipDestination>". "<Pounds>0</Pounds><Ounces>9</Ounces><Container/><Size>REGULAR</Size></Package></RateV4Request>"; $xml_string = file_get_contents($api); $xml = simplexml_load_string($xml_string); ?> Pretty straightforward. However it never returns anything. I can paste the URL directly into my browser's address bar: http://production.shippingapis.com/ShippingAPI.dll?API=RateV4&XML=<RateV4RequestUSERID="MYUSERID" PASSWORD="MYPASSWORD"><Revision/><Package ID="1ST"><Service>FIRST CLASS</Service><FirstClassMailType>PARCEL</FirstClassMailType><ZipOrigination>12345</ZipOrigination><ZipDestination>54321</ZipDestination><Pounds>0</Pounds><Ounces>9</Ounces><Container/><Size>REGULAR</Size></Package></RateV4Request> And it returns the XML I need, so I know the URL is valid. But I cannot seem to capture it using PHP. Any help would be tremendously appreciated. Thanks in advance.

    Read the article

  • receive xml file as a parameter to a .net web service

    - by fizch
    My company is currently looking into bringing a new piece of third party software in for online ordering. The software does not handle pricing so they are requesting the pricing information from a web service. Their software is passing an XML file as a parameter, and expecting an XML file as a response. I would think that returning an XML file would be pretty straight forward, but I cannot think of a way to receive an XML file as a parameter. Has anyone done this, or am I missing something really obvious?

    Read the article

  • Java: Writing a DOM to an XML file (formatting issues)

    - by Vhaerun
    I'm using org.w3c XML API to open an existing XML file. I'm removing some nodes , and I'm adding others instead . The problem is that the new nodes that are added are written one after another , with no newline and no indentation what so ever. While it's true that the XML file is valid , it is very hard for a human to examnine it. Is there anyway to add indentation , or at least a newline after each node ?

    Read the article

  • Suggestions related to Android final application?

    - by UMMA
    dear friends, i have completed my First android application and i have deployed that application to different android based mobile phones which is working fine. my question to you is, is there iphone store like thing exists in android to upload your application by paying fee to android store or something like that.. or nothing or should i start passing my application to end users directly? any help would be appriciated.

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >