xml

XST - using output from call-template as return value

Suppose i have a template foo which can output something given a parameter. Now I want to use that output as a parameter to my other template, loop so I can loop the output a certain number of times. I have tried something along the way of <xsl:call-template name="loop"> <xsl:with-param name="times" select="someParam"/> ...

NOSQL vs XML document storage

When to choose NoSQL and when to choose XML ? Update: I want to know when one can use NoSQL exclusively, XML exclusively or both. I want real examples not generalities. ...

Why is my Java JOX parser servlet failing to convert from bean to string?

Currently working through a tutorial on JOX included within Sams Teach Yourself JavaServer Pages 2.0 with Apache Tomcat in 24 Hours Either the com.wutka.jox has changed or the author missed a crucial ingredient. When I try to execute: java "hu/flux/xml/XMLTestClient" "http://localhost:8080/SamsTeachYourselfJSP/joxparse" "d:\education\...

Get the HTML value which is not in a tag in c#

I have an HTML string that has the following form: <tr valign="top"><td colspan="2" style="padding-bottom:5px;text-align: left"><label for="base_1001013" style="margin-bottom: 3px; float: left">Nom d'utilisateur:&nbsp;</label><span style="float: right;"><input class="PersonalDetailsClass" type="text" name="base_1001013" id="base_1001...

3 approaches to work with XML

I need to use different approaches when working with XML - LINQ to XML, streaming, DOM. Can anybody give me examples of this approaches? I just want to see what's the difference between this approaches. ...

Android: How do I assign each of my ListView list items an individual icon?

Hi, I'm very new to Android delelopment, searching and reading various tutorials and using different parts of code from around the internet, trying to make sense of it as I go. Forgive me if my explanation isn't too great. Currently I have a list created with 4 list items, what I'd like to do is assign a different icon to each of these...

How to make an "empty" RSS feed

I'm kind of new to rss feeds, but I'm able to create a feed dynamically using PHP and it works great. My problem is that occasionally the feed doesn't have any items (I limit the age of feed items to 60 days, and sometimes nothing has happened in that time). What I would expect to happen is that I just simply wouldn't have any <item>s ...

Read dynamic xml using element tree

Hi, Environment: Windows,Python,wxpython and Element tree as xml parser. I am developing a stand alone where it reads the xml and creates a tree. My application reads the xml and creates tree but when xml changes next time(when DEPTH of xml increases- i mean when two child elements are added).Application fails to read(Logic fails :( ) ...

Parsing XML with php and save it to mysql.

Hi Guys, I have been asked to parse a simple file which is stored as an XML file, the data is to be then save it to a mysql. However I have absolutely no clue what to do and after looking online all the examples given seem either too complicated for my problem or not the right solution. The XML file looks like this games_scores.xml <g...

xslt - adding </tr><tr> every n node?

I found an elegant solution for that problem here: http://stackoverflow.com/questions/3806578 I'd like to understand the xslt code and I was wondering if you could help me to understand it by taking a look at the link provided above. Basically there are 3 <xsl:template>. To me the first 2 ones are enough to achieve the purpose. Howeve...

Second GetelementbyTagname in another GetelementbyTagname

hello, i am parsing a XML string to an XML Document in Javascript. The xml structure might look like this: <parent> <parent2> <x> <y1/> <xyz> <tra/> <xyz> <y2/> </x> <x> <y1/> </x> .. </parent2> </parent> Now i wa...

Handling Empty Nodes Using Java DOM

Hello everyone, I have a question concerning XML, Java's use of DOM, and empty nodes. I am currently working on a project wherein I take an XML descriptor file of abstract machines (for text parsing) and parse a series of input strings with them. The actual building and interpretation of these abstract machines is all done and working...

Android: Layout Responds to Activity

I would like the main layout file (main.xml) respond to the main activity. I would like a TextView inside the layout file only to show if a variable, located in the main activity, equals a certain number, like 0. If the variable is 1 or 2, I want it to show something else. What's the easiest way to perform this? I'm not really sure if t...

How do I post XML?

How do I post a XML and get the response status from the response? I want to post <myExampleRequest><myValue>xyz</myValue></myExampleRequest> to http://domain.com/GetStatus.aspx The page responds with <myExampleResponse><status>True</status><Message></Message></myExampleResponse> ...

Retrieving HTML encoded text from XML using SAXParser

This is my first time using SAXParser, (I'm using it in Android, but I don't think that makes a difference for this particular issue) and I'm trying to read in data from an RSS feed. So far, it's working great for me for the most part, but I'm having trouble when it gets to a tag that contains HTML encoded text (e.g. &lt;a href="http://....

how to change page content type at runtime in MVC?

hi, I am working in asp.net MVC & on the view has to show both json & xml content depending on some condition. I have to change the content type of the page at runtime ie, if the condition for json is fulfilled then set page contenttype = "text/json" & if the condition for xml is fulfilled then set page contenttype = "text/xml". ...

how to create an xml using java?

Hi i am new for XML.i have a function that takes four input.on the basis of these four parameter create an XML using Java.for example: <?xml version="1.0" encoding="UTF-8"> <validateemail> <emailid>[email protected]</emailid> <address>abc,street</address> </validateemail> After that formed XML is return as String.please guide me. Than...

XML validation using Java Code

I need some code sample which shows how I can validate a xml file against a schema. Below is my XML document: <birthdate> <month>January</month> <day>21</day> <year>1983</year> </birthdate> The schema against which I want to validate the above XML is: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:import...

Getting information from xml php

I'm creating a script that will take users location from their ip. I saw this api.But know idea how i can get them in array and print them. Here is a sample link: http://ipinfodb.com/ip_query.php?ip=74.125.45.100&amp;timezone=true This a sample respones <Response> <Ip>74.125.45.100</Ip> <Status>OK</Status> <CountryCode>US</CountryCode...

how to append a new value in xml using java?

Hi i have an String like: String msg= <?xml version="1.0" encoding="UTF-8" standalone="no"> <validateEmail> <emailid>[email protected]</emailid> <instanceid>instance1</instanceid> <msgname>validatemsg</msgname> <taskid>task1</taskid> </validateEmail> how i am able to convert this string in...