Posts

Showing posts with the label xml

Duplicate Resources: Is there a way to automatically ignore the duplicate resource when building in android studio

Duplicate Resources: Is there a way to automatically ignore the duplicate resource when building in android studio I'm new to Android propramming and this is also my first time asking a question in here, so if my question or my English is not good or sounds stupid to you, I'm sorry about that. Back to my question, suppose that I have 2 res folder but not in the same path,and with each of res folder which has a values folder. In values folder, there is a string.xml file. (See the picture below). Inside of each of string.xml file, there are 2 string names which defined similarly. When I build the project, error occurs. Error:Execution failed for task ':app:mergeDebugResources'. [string/app_name] E:AndroidStudioProjectstestappsrcmainresvaluesstrings.xml [string/app_name] E:AndroidStudioProjectstestappsrcmainjavacomexamplequywntestresvaluesstring.xml: Error: Duplicate resources Of coure with only 2 string.xml file, I can rename or delete it manually, but when I have a lot...

Query string properties stored as XML

Query string properties stored as XML I am using Entity Framework to query a db which is defined by a model: inside this model I have several classes having a #region dynamic values : #region dynamic values [DataContract] public class Job : AbstractEntity, IJob { [DataMember] public virtual Guid Id { get; set; } ... #region dynamic values [DataMember] public virtual string MetadataValue { get; set; } [DataMember] public virtual string ParametersValue { get; set; } [DataMember] public virtual string AttributesValue { get; set; } #endregion #region links ... #endregion } AttributesValue , MetadataValue and ParametersValue are declared as string but are stored inside the db as XML documents. I am aware that this is not consistent with the model and should be changed, but for some reasons it has been managed this way and I am not allowed to modify it. I have created a Unit Test in order to better handle the problem, and here is the ...

Send XML file to webservice SOAP with Java class

Send XML file to webservice SOAP with Java class I need to send an XML file through a java class to a SOAP webservice. I'm getting the following error message: com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: Cannot find dispatch method for {}Contribuinte Please see the server log to find more detail regarding exact cause of the failure. Here's the XML I want to send <?xml version="1.0" encoding="ISO-8859-1"?> <Contribuinte xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='Contribuinte.xsd'> <Nome>CONTRIBUINTE TESTE INTEGRAÇÃO</Nome> <NomeFantasia>CONTRIBUINTE TESTE INTEGRAÇÃO</NomeFantasia> <TipoPessoa>J</TipoPessoa> <Documento>16619539000163</Documento> <InscricaoMunicipal>152165</InscricaoMunicipal> <Rg>2185188</Rg> <InscricaoEstadual>151616</...

Issues with XML Layout and Software Buttons

Image
Issues with XML Layout and Software Buttons So basically I have an activity with 4 buttons that in Android Studio look out of the way of the software buttons at the bottom of the screen but when I run it on my phone they are not. I'm not sure if I have the right constraints on the bottom button or not? <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".NewMainMenu" tools:layout_editor_absoluteY="25dp"> <Button android:id="@+id/button" android:layout_width="411dp" android:layout_height="100dp" android:layout_marginTo...

cvc-elt.1 in Tutorial 5, New Perspectives

cvc-elt.1 in Tutorial 5, New Perspectives For my XML online class, I was assigned this Tutorial to completes. Jenna has been working on creating a DVD library where she can list all of the DVDs that she has. Some she bought herself, others were gifts from her mom, dad, sister, grandpa, and grandma. The root element for her library is dvdlibrary with one or more dvd elements. Each dvd has a title, description, year, company, favorite characters, favorite bonus features, and purchase information. Her characters elements each have one or more character elements. Her bonus elements each have one or more features. Her purchased elements each have price, location, and date. The dvd element has two attributes, bonus element has one attribute, and the purchased element has no attributes. Jenna wishes to create an XSLT style sheet to use to display the DVD collection information attractively. She has already created a CSS style sheet for the page. Complete the following: Go to the dvdlibrary.xs...

Cannot resolve this symbol for an Object

Cannot resolve this symbol for an Object On creating an object RadioGroup in OnCreate() , when later this object is called in another function it shows the error "cannot resolve this symbol" Here is java code MainActivity.java MainActivity.java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); RadioGroup group1 = (RadioGroup)findViewById(R.id.que1_rG); RadioGroup group2 = (RadioGroup)findViewById(R.id.que2rG); RadioGroup group3 = (RadioGroup)findViewById(R.id.que3rG); RadioGroup group4 = (RadioGroup)findViewById(R.id.que4rG); RadioGroup group5 = (RadioGroup)findViewById(R.id.que5rG); RadioGroup group6 = (RadioGroup)findViewById(R.id.que6rG); RadioGroup group7 = (RadioGroup)findViewById(R.id.que7rG); RadioGroup group8 = (RadioGroup)findViewById(R.id.que8rG); RadioGroup group9 = (RadioGroup)findView...

How to collect array indexes from different resources?

How to collect array indexes from different resources? I get data from 2 different URLs, But sometimes both have the same data. I only want to save the data in an array when the data is the same. Getting the data from first website: $a = 'http://firstwebsite.com'; $rss = simplexml_load_file($a); foreach ($rss->channel->item as $item) { $post['title'] = $item->title; $post['link'] = $item->link; $post['date'] = $item->pubDate; $post['description'] = $item->description; $articles = $post; } So that if I print the articles array: echo '<pre>'; print_r($articles); echo '</pre>'; I get: Array ( [0] => Array ( [title] => SimpleXMLElement Object ( [0] => First Item Title ) [link] => SimpleXMLElement Object ( [0] => http://firstitemlink.com ) [date] => SimpleXMLElem...