Search Results

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

Page 94/1032 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • Reading an XML File with .NET

    - by Daywalker21
    I am new to xml and unable to find a way to get content in between tags. My XML file is <?xml version="1.0" encoding="utf-8"?> <block1> <file name="c:\w0.xml"> <word>Text</word> <number>67</number> </file> <file name="c:\w1.xml"> <word>Text</word> <number>67</number> </file> <file name="c:\w2.xml"> <word>Text</word> <number>67</number> </file> </block1>

    Read the article

  • Using an XML Catalog with a Java library that uses JAXP internally

    - by Brian Ferris
    I'm using the Apache web service xml rpc library to make requests to an rpc service. Somewhere in that process is a xml document with a DTD reference to http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd, which the library attempts to download when parsing the XML. That download fails with a 503 status code because the w3c is blocking repeated downloads of this largely static document from Java clients. The solution is XML Catalogs to locally cache the DTD. However, while I can find examples of setting an EntityHandler on a JAXP SAXParser instance directly to enable catalog parser support, I don't actually have access to the underlying parser here. It's just being used by the xml rpc library. Is there any way I can set a global property or something that will tell JAXP to use XML catalogs?

    Read the article

  • Saving a huge dataset into SQL table in a XML column - MS SQL, C#.Net

    - by NLV
    Hello all I'm having a requirement where i've to save a dataset which has multiple tables in it in a sql table XML column by converting into an XML. The problem is that in some cases the dataset grows extremely huge and i get OutOfMemoryException. What i basically do is that i convert the dataset into an xml file and save it in the local disk and then load the XML again and send it as a stored procedure parameter. But when i write the dataset xml into the disk the file sizes over 700 Mb and when i load it in the XMLDocument object in memory i get OutOfMemoryException. How can get the dataset xml without saving it in a file and re-reading it again? Thank You NLV

    Read the article

  • [Android] ProgressBar inside SimpleAdapter

    - by lemon
    I'm trying to add a ProgressBar to my row.xml view but I can't seem to make it work I keep getting 06-09 12:44:44.802: ERROR/AndroidRuntime(1012): java.lang.IllegalStateException: android.widget.ProgressBar is not a view that can be bounds by this SimpleAdapter ArrayList arr = new ArrayList(); HashMap map = new HashMap(); map.put("progress", 10); arr.add(map); String [] fieldNames = {"progress"}; int [] fieldIds = {R.id.progress}; SimpleAdapter adapter = new SimpleAdapter(this, arr, R.layout.row, fieldNames, fieldIds); list = (ListView) findViewById(R.id.list); list.setAdapter(adapter); <ProgressBar android:id="@+id/progress" style="?android:attr/progressBarStyleHorizontal" android:max="100" android:progress="5" android:layout_width="fill_parent" android:layout_height="fill_parent" /> Does anyone have any idea what I'm missing?

    Read the article

  • PostgreSQL 8.3 data types: xml vs varchar

    - by Sejanus
    There's xml data type in Postgres, I never used it before so I'd like to hear opinions. Downsides and upsides vs using regular varchar (or Text) column to store xml. The text I'm going to store is xml, well-formed, UTF-8. No need to search by it (I've read searching by xml is slow). This XML actually is data prepared for PDF generation with Apache FOP. XML can be generated dynamically from data found elsewhere (other Postgres tables), it's stored as is only so that I won't need to generate it twice. Kinda backup#2 for already generated PDF documents. Anything else to know? Good practices, performance, maintenance, etc?

    Read the article

  • Problem of reading OWL/XML

    - by Mikae Combarado
    Hello, I have a problem reading OWL/XML files from Java using Jena. I have no problem reading RDF/XML files, but whenever I create a OWL/XML file from Protege and try to read it, Java gives this error below : WARN [main] (RDFDefaultErrorHandler.java:36) Exception in thread "main" java.lang.NullPointerException at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.endElement(XMLHandler.java:143) The code that I use to retrieve RDF/XML is below : OntModel ontModel = ModelFactory.createOntologyModel(); InputStream in = FileManager.get().open(inputFileName); if (in == null) { throw new IllegalArgumentException( "File: " + inputFileName + " not found"); } ontModel.read(in, ""); This code works with RDF/XML perfectly. However, I cannot read an OWL/XML. I looked at Internet and I couldn't find anything. I would really appreciate, if someone shows me a way. Many thanks

    Read the article

  • Android draw using SurfaceView and Thread

    - by Morten Høgseth
    I am trying to draw a ball to my screen using 3 classes. I have read a little about this and I found a code snippet that works using the 3 classes on one page, Playing with graphics in Android I altered the code so that I have a ball that is moving and shifts direction when hitting the wall like the picture below (this is using the code in the link). Now I like to separate the classes into 3 different pages for not making everything so crowded, everything is set up the same way. Here are the 3 classes I have. BallActivity.java Ball.java BallThread.java package com.brick.breaker; import android.app.Activity; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; public class BallActivity extends Activity { private Ball ball; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); ball = new Ball(this); setContentView(ball); } @Override protected void onPause() { // TODO Auto-generated method stub super.onPause(); setContentView(null); ball = null; finish(); } } package com.brick.breaker; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.view.SurfaceHolder; import android.view.SurfaceView; public class Ball extends SurfaceView implements SurfaceHolder.Callback { private BallThread ballThread = null; private Bitmap bitmap; private float x, y; private float vx, vy; public Ball(Context context) { super(context); // TODO Auto-generated constructor stub bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.ball); x = 50.0f; y = 50.0f; vx = 10.0f; vy = 10.0f; getHolder().addCallback(this); ballThread = new BallThread(getHolder(), this); } protected void onDraw(Canvas canvas) { update(canvas); canvas.drawBitmap(bitmap, x, y, null); } public void update(Canvas canvas) { checkCollisions(canvas); x += vx; y += vy; } public void checkCollisions(Canvas canvas) { if(x - vx < 0) { vx = Math.abs(vx); } else if(x + vx > canvas.getWidth() - getBitmapWidth()) { vx = -Math.abs(vx); } if(y - vy < 0) { vy = Math.abs(vy); } else if(y + vy > canvas.getHeight() - getBitmapHeight()) { vy = -Math.abs(vy); } } public int getBitmapWidth() { if(bitmap != null) { return bitmap.getWidth(); } else { return 0; } } public int getBitmapHeight() { if(bitmap != null) { return bitmap.getHeight(); } else { return 0; } } public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { // TODO Auto-generated method stub } public void surfaceCreated(SurfaceHolder holder) { // TODO Auto-generated method stub ballThread.setRunnable(true); ballThread.start(); } public void surfaceDestroyed(SurfaceHolder holder) { // TODO Auto-generated method stub boolean retry = true; ballThread.setRunnable(false); while(retry) { try { ballThread.join(); retry = false; } catch(InterruptedException ie) { //Try again and again and again } break; } ballThread = null; } } package com.brick.breaker; import android.graphics.Canvas; import android.view.SurfaceHolder; public class BallThread extends Thread { private SurfaceHolder sh; private Ball ball; private Canvas canvas; private boolean run = false; public BallThread(SurfaceHolder _holder,Ball _ball) { sh = _holder; ball = _ball; } public void setRunnable(boolean _run) { run = _run; } public void run() { while(run) { canvas = null; try { canvas = sh.lockCanvas(null); synchronized(sh) { ball.onDraw(canvas); } } finally { if(canvas != null) { sh.unlockCanvasAndPost(canvas); } } } } public Canvas getCanvas() { if(canvas != null) { return canvas; } else { return null; } } } Here is a picture that shows the outcome of these classes. I've tried to figure this out but since I am pretty new to Android development I thought I could ask for help. Does any one know what is causing the ball to be draw like that? The code is pretty much the same as the one in the link and I have tried to experiment to find a solution but no luck. Thx in advance for any help=)

    Read the article

  • Actionscript 3 : XML cached in local testing

    - by Boun
    Hi, My question is about XML loading. I need to avoid xml caching. On a web server, the technique is adding a random param to reload each time the XML file. But on local testing (in Flash CS4 IDE, CTRL + Enter), the following lines are not possible : var my_date : Date; path = "toto.xml?time="+my_date.getSeconds()+my_date.getMilliseconds(); Is there any trick to bypass this issue ? I've read on different forum about the "delete" method, we delete the xml object and then recreate one new. In my case, I put : myXML = null; myXML = new XML ( loadedData ); But it doesn't work at all. I spent many hours on that problem, if anyone has a good solution... Thank you.

    Read the article

  • Why can XSLT not parse this XML?

    - by Matt W
    Taking the XSLT and XML from this page as an example: http://www.w3schools.com/xsl/xsl_transformation.asp I have an xml file which contains (above example modified): <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?> <catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/"> <cd> In my case, the output contains nothing when the XSLT/XML is processed by the browser. The moment I remove the attributes from the element, it works. Problem is, I don't really have the option of pre-processing those attributes out of the file. Can anyone explain how to force the XSLT to work with the XML as is, please? After all, those attributes seem fairly standard. Many thanks, Matt.

    Read the article

  • Link XSL Style Sheet to XForms generated XML document

    - by iHeartGreek
    Hi! Through XForms, I generate an XML document. I need this XML document to be transformed by a specific XSL. How do I link the XSL to the XML through XForms? Example of link: <?xml-stylesheet type="text/xsl" href="test.xsl"?> (The XML doc gets regenerated every time the XForms submits to it.. so I cannot hardcode the link in the XML doc, in needs to be done through the XForms) Thanks!

    Read the article

  • Parsing WordPress XML, slash:comments syntax?

    - by user313653
    This is really just a syntax question. I have a PHP script that parses my WordPress feed and returns the latest posts. I also want my script to parse the # of comments, but the WordPress feed XML object for number of comments has a colon in it (slash:comments). It causes the following error: Parse error: syntax error, unexpected ':' in ... on line ... I have tried each of the following without luck: $xml->slash:comments $comments = 'slash:comments' $xml->$comments $xml->slash.':'.comments $xml->{slash:comments} $xml->{'slash:comments'} How do I parse an object with a colon?

    Read the article

  • 'Out of Memory exception' in sql server 2005 xml column

    - by Raghuraman
    Hi All, I am devloping a windows forms application and am using sql server 2005 database as my backend. I am having an xml column in my database. I am using ultrawingrid control in my application.I obtain the xml of the dataset which is bound to my ultrawingrid control and pass that as a parameter value to the stored procedure where am inserting this value into the xml column which I specified. The columns in my grid are dynamic and hence there can be any no of columns in my grid. I got 'out of memory' exception in the dataset.GetXml() statement since there were more no of columns I believe.So, what I did is that I used dataset.WriteXml() method and stored all the xml contents into an xml file, loaded the xml file into the XmlDocument object and then passed the xmlnodereader as the value to the stored procedure parameter.Now, while executing the stored procedure am getting the same 'out of memory' exception. How could I resolve this issue?

    Read the article

  • More XML Problems - Undeclared Entity 'nbsp'

    - by Gogster
    I'm getting the error: Line 49: xml = r.ReadToEnd(); Line 50: Line 51: System.Xml.Linq.XDocument xmlDoc = System.Xml.Linq.XDocument.Parse(xml); Line 52: Line 53: var query = from p in xmlDoc.Descendants("member") On my XML. When I run the code to generate the XML in an empty page, it runs without error, if I call the code within my webpage it throws this error. The only 'nbsp' on the page is a doctype declaration at the top of the XSLT: <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]> I'm at a loss as to where this error is coming from and I am looking for suggestions please! Thanks.

    Read the article

  • remove non-UTF-8 characters from xml with declared encoding=utf-8 - Java

    - by St Nietzke
    I have to handle this scenario in Java: I'm getting a request in XML form from a client with declared encoding=utf-8. Unfortunately it may contain not utf-8 characters and there is a requirement to remove these characters from the xml on my side (legacy). Let's consider an example where this invalid XML contains £ (pound). 1) I get xml as java String with £ in it (I don't have access to interface right now, but I probably get xml as a java String). Can I use replaceAll(£, "") to get rid of this character? Any potential issues? 2) I get xml as an array of bytes - how to handle this operation safely in that case?

    Read the article

  • ADT will not allow creation of Android Activity

    - by NewShelbyWoo
    I installed the ADT bundle from http://developer.android.com/sdk/index.html yesterday, and I was following a basic Hello World tutorial. I created a new Android Application Project with a Blank Activity named MainActivity. The resulting project has an empty src folder and empty res\layout folder. There is a R.java file in the gen folder but it has no reference to MainActivity. This is what the SDK manager says I have installed Android SDK Tools v 22.6 Android SDK Platform-tools v 19.0.1 Android SDK Build-tools v 19 SDK Platform v 3 ARM EABI v7a System Image v 2 Android Support Library v 19.0.1 Google USB Driver v 9 I also tried manually creating an activity by right clicking the src folder and going to Android Activity, but when I hit Finish on the creation wizard, nothing happens. Does anyone have any clues as to what's going on? Did I miss a key component to install or something?

    Read the article

  • Parsing XML data with Namespaces in PHP

    - by osbmedia
    I'm trying to work with this XML feed that uses namespaces and i'm not able to get past the colon in the tags. Here's how the XML feed looks like: <r25:events pubdate="2010-05-19T13:58:08-04:00"> <r25:event xl:href="event.xml?event_id=328" id="BRJDMzI4" crc="00000022" status="est"> <r25:event_id>328</r25:event_id> <r25:event_name>Testing 09/2005-08/2006</r25:event_name> <r25:alien_uid/> <r25:event_priority>0</r25:event_priority> <r25:event_type_id xl:href="evtype.xml?type_id=105">105</r25:event_type_id> <r25:event_type_name>CABINET</r25:event_type_name> <r25:node_type>C</r25:node_type> <r25:node_type_name>cabinet</r25:node_type_name> <r25:state>1</r25:state> <r25:state_name>Tentative</r25:state_name> <r25:event_locator>2005-AAAAMQ</r25:event_locator> <r25:event_title/> <r25:favorite>F</r25:favorite> <r25:organization_id/> <r25:organization_name/> <r25:parent_id/> <r25:cabinet_id xl:href="event.xml?event_id=328">328</r25:cabinet_id> <r25:cabinet_name>cabinet 09/2005-08/2006</r25:cabinet_name> <r25:start_date>2005-09-01</r25:start_date> <r25:end_date>2006-08-31</r25:end_date> <r25:registration_url/> <r25:last_mod_dt>2008-02-27T14:22:43-05:00</r25:last_mod_dt> <r25:last_mod_user>abc00296004</r25:last_mod_user> </r25:event> </r25:events> And here is what I'm using for code - I'll trying to throw these into a bunch of arrays where I can format the output however I want: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://somedomain.com/blah.xml"); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); curl_setopt($ch, CURLOPT_USERPWD, "username:password"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); $xml = new SimpleXmlElement($output); foreach ($xml->events->event as $entry){ $dc = $entry->children('http://www.collegenet.com/r25'); echo $entry->event_name . "<br />"; echo $entry->event_id . "<br /><br />"; }

    Read the article

  • Draw and move animation from xml in android

    - by Muahammad Yousuf Saif
    What I want to do: I want to draw image from xml and then animate it from xml. this image should move with constant speed anywhere on our screen. Now the problem is: I can draw and animate image from xml but i can not move this image with constant speed. I am using two xml files: One for animate and other for moving. XML for animation: android:duration="200"/ XML file for move: <translate android:interpolator="@android:anim/linear_interpolator" android:fromXDelta="2%" android:toXDelta="400%" android:fromYDelta="2%" android:toYDelta="800%"/> Activity.java file code in onCreate() method: ImageView rocketImage = (ImageView) findViewById(R.id.rocket_image); Animation hyperspaceJump = AnimationUtils.loadAnimation(this, R.anim.hyperspace_jump); rocketImage.setBackgroundResource(R.drawable.rocket_thrust); AnimationDrawable rocketAnimation = (AnimationDrawable) rocketImage.getBackground(); rocketAnimation.start(); rocketImage.startAnimation(hyperspaceJump);

    Read the article

  • Word 2010 for writing invoices, starting with XML

    - by TomTom
    Hello, we are doing quite some invoice generation, and so far it is based on some pretty awful word automation that is now in for a review with Word 2010. I would love to move to a XML based format for storing / presenting invoices, only going to a word document in the last stage. This means I can use easily othermeans to present an invoice internally from the XML. We use Word as "last stage" because Word is a lot better than anything else ever discovered for formatting - our invoices have quite some text sometimes, in the invoice item table, and word is smartest with handling page breaks in the "correct" way. Now, here my question: is there any proper way by now to do this with XML easily? I remember Word having (had) in 2007 some XML field mapping mechanism, but it did not handle tables in the XML. Was anything changed? What would be the proposed approach for generating an .docx document (starting with a .dotx templace) for an invoice, if the relevant data is available in XML form?

    Read the article

  • Flex 4: Defining a XML data model in an Actionscript Class

    - by Steve
    I'm really having a hard time accessing a data model I've defined in an Actionscript class in my Flex app. The following is my AS Class (Model.as): package { import mx.rpc.http.HTTPService; public class Model { private static var _instance:Model; public static function getInstance():Model { if (!_instance) _instance = new Model(); return _instance; } [Bindable] public var xml:mx.rpc.http.HTTPService = new mx.rpc.http.HTTPService(); Model.getInstance().xml.url = "http://127.0.01/RAF/DATAPOINTS.xml"; Model.getInstance().xml.resultFormat = "e4x"; } } I'm then trying to access this in my main application with the following code: Model.getInstance().xml.send(); var sectorList:XMLList = Model.getInstance().xml.lastResult; And it just keeps throwing errors. The errors are generic so I can't determine the source in debugging. Hope this is enough info...

    Read the article

  • how do I find the number of xml children in AS3

    - by vasion
    so live docs says this for calling .lenght() on an XML object For XML objects, this method always returns the integer 1. The length() method of the XMLList class returns a value of 1 for an XMLList object that contains only one value. i called it on an xml that looked like this: <xml> <picture>1</picture> <picture>2</picture> </xml> and it reallt returned 1. how do i get the number of children in my xml?

    Read the article

  • Circular gradient in android

    - by sandis
    Im trying to make a gradient that emits from the middle of the screen in white, and turns to black as it moves toward the edges of the screen. As I make a "normal" gradient like this, I have been experimenting with different shapes: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#E9E9E9" android:endColor="#D4D4D4" android:angle="270"/> </shape> When using the "oval"-shape I at least got a round shape, but there were no gradient effect. How can I achieve this? Cheers,

    Read the article

  • Remote XML retrieval

    - by rrrfusco
    I'm retrieving a remote XML file with wget -O remotefile localfile with a cron tab. Every so often the local file becomes malformed probably because of double whitespace (according to firefox) between the CDATA tags. Sometimes the parser gives an error for ' > ' missing, but upon checking the xml file the ' > ' exists... The remote xml file never gives malformed errors when called in the url. EDIT It seems CDATA is not parsed by the xml parser. (w3schools) Is there a way to set wget to retain wellformed XML? If not wget, What is a good way to continously retrieve a remote XML file and keep it well formed?

    Read the article

  • Android internet connectivity check problem

    - by Chaoz
    Hello, I'm new to Android development and working on an Android application that requires the phone to be connected to the internet, through either Wifi, EDGE or 3G. This is the code that I'm using: public static boolean isConnected() { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); return cm.getActiveNetworkInfo().isConnectedOrConnecting(); } I've also set these permissions in the manifest file: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> This works fine in the emulator running version 1.5 of Android when 3G is enabled, but it crashes when I disable the 3G connection. My application throws a null pointer exception when I call isConnectedOrConnecting(). Hope that anyone knows the solution to this. Thanks in advance!

    Read the article

  • parsing a xml to get some values

    - by Joan Silverstone
    Hello, i have this xml: http://www.managerleague.com/export_data.pl?data=transfers&output=xml&hide_header=0 These are player sales from a browser game. I want to save some fields from these sales. I am fetching that xml with curl and storing on my server. Then do the following: $xml_str = file_get_contents('salespage.xml'); $xml = new SimpleXMLElement($xml_str); $items = $xml->xpath('*/transfer'); print_r($items); foreach($items as $item) { echo $item['buyerTeamname'], ': ', $item['sellerTeamname'], "\n"; } The array is empty and i cant seem to get anything from it. What am i doing wrong?

    Read the article

  • Write an xml file from the specified node?

    - by Googler
    Hi all, This is my xml file Input: <world> <patent> <xml>a</xml> <java>333</java> <jaxb>111</jaxb> </patent> </world> I need the read the above xml file and reproduce the following the output Output: <patent> <xml>a</xml> <java>333</java> <jaxb>111</jaxb> </patent> I dont need the world element. How to achieve this using Xpath. Can anyone help me on this?

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >