xml

How to append entries to an XML document

Warning: I have no clue about how to work with XML. I have a simple application whose only purpose is to persist ten properties about an object (a log, if you will). I wrote it rapidly and it writes the properties by appending them to a plain text file. Problem solved. Now, I read that for simple applications like this one XML would be...

How to integrate Simply Hired XML API with C# code(ASP.NET MVC )

HI, Simply hired provides APIs for accessing job info programmatically. please have a look at the following URL. Simply Hired API call When i make a request with this URL. I get some thing like XML. But this doesnt begin with a XML tag . The SImply Hired API provider have also given the DTD to validate against. E.g Response from s...

Writing spec for controller actions that return XML -- Ruby on Rails

In my controller I have some methods which return json as well as xml data. I need to test those actions. For testing the json part I found this reference and it is working fine. Now I am need of testing the actions for the XML part. Anyone who can help or suggest something are most welcome I've been scratching my head for an hour now bu...

How to access modified cell value if WPF datagrid is bound to ItemsSource?

I have a wpf datagrid where the columns have textbox cell template added. Data is populated from an xml source through a person class. <Persons> <Person FirstName="John" LastName="Doe" Age="37", Sex="Male"/> <Person FirstName="Paul" LastName="Sams" Age="34", Sex="Male"/> </Persons> The datagridrow will be the person class ...

removing xmlns from xml file

Hi I am Appending new Elements into XML file which is creating additional xmlns attribute and cannot be removed. i tried most of the common options here's my code This Add's new Entrys to the XML file Private Sub AddNewElement(ByRef FileInfo As System.IO.FileInfo) Dim bln As Boolean = False Dim XmlDoc As System.Xml...

Convert XML tree into flat list of nodes using XSL

How can I convert this XML <albums> <album title="New Zealand"> <album title="Auckland"> <image title="Mt Eden railroad station"/> <image title="Morgan St"/> </album> </album> <album title="Russia"> <image title="Capital of Siberia"/> </album> </albums> into that <div cl...

XML parsing issue with '&' in element text

I have the following code: import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringRea...

Binding a textfield to some XML

I'm currently looking at ways to externalise all text in my flash applications into external xml files (for translation purposes). Basically, all copy in these applications has to be in two languages (English and Welsh). At the moment, I'm just looking at a structure whereby the name of each TextField instance is the same as a field in...

SQL Server 2008 XML Query method - retrieve text() value where another text() value exists?

Please consider the following: DECLARE @xml XML SET @xml = '<Capture> <Data><DataType>Card Number</DataType><Value>1234567898765</Value></Data> <Data><DataType>Expiry Date</DataType><Value>1010</Value></Data> </Capture>' SELECT @xml.query('//*[text()="Expiry Date"]/text()') Returns: Expiry Date Rather than retrieving the <DataTyp...

Microsoft.XMLDOM js question

Hi all, Is it possible to check if loaded with xmlDoc.loadXML(xmlData); xml string is invalid? For example if there is missed closing bracket or a tag. ...

ASP.NET AdRotator AdvertisementFile xml file from outside the application

Hello, I have an ASP.NET web site, let's call it MySite, and at the same level as the web site, a virtual folder - Data. And in that folder I have the xml file needed in an AdRotator control. I put "http://localhost/Data/Ads.xml" in AdvertisementFile and I get this error: 'http://localhost/Data/Ads.xml' is not a valid virtual path. I...

Building nested hierarchy of ids using XSLT

Continuing my previous question. XML <albums> <album title="new_zealand"> <album title="auckland"> <image title="mt_eden_railroad_station"/> </album> </album> </albums> Expected output <div> <a href="#new_zealand">new_zealand</a> </div> <div id="new_zealand"> <a href="#new_zealand/aucklan...

What are some of the pitfalls/tips one could give for developing a web service

Looking to develop a web service (api) in PHP to offer customers an easier way to integrate with our platform. There are workflow calls that will be validated with user/pass as well as some reporting options. Sorry I can't post more details or code on the subject and I have never developed a web service but have had experience in using ...

Detecting incoming XML "CR" character, then converting to <br/>

I am using XSLT inside of ASP, it's serviced by msxml6. Incoming XML loaded to the object has "carriage returns" which I think may be ASCII 10. I would like to transform those to <br/> in the output. I am trying to detect &#10; in the incoming XML, but can't seem to find that. I've tried Javascript (JScript inside of ASP), to no avai...

Deserialize XML exception in Facebook response for new accounts

I am using the Facebook-c-sharp to upload photos to Facebook. This code works fine but for new accounts of Facebook this code seems to have problem. I thought may be its something to do with the new privacy policies of Facebook and moreover authors of above code have stopped working on new releases. The problem seems to be with creating ...

XPath expression to select nodes between a defined sequence of preceding and succeeding nodes

I've got the following structured XML file: <w:document> <w:body> <w:p> <w:r> <w:t/> </w:r> </w:p> <w:p> <w:r> <w:t/> </w:r> </w:p> <w:p> <w:r> <w:instrText/> </w:r> </w:p> ...

Can hibernate call return a XML data?

Hi, I would like to know if we call a Java class annotated with hibernate classes. Can we get the data from the table in a XML format? browser give data for id =1 --> Servlet --> hibernate class (with some magic xml functionality) --> returns the data in XML format(Can this really happen?) Thanks, Sana. ...

Alphanumeric sort on mixed string value

Given XML snippet of: <forms> <FORM lob="BO" form_name="AI OM 10"/> <FORM lob="BO" form_name="CL BP 03 01"/> <FORM lob="BO" form_name="AI OM 107"/> <FORM lob="BO" form_name="CL BP 00 02"/> <FORM lob="BO" form_name="123 DDE"/> <FORM lob="BO" form_name="CL BP 00 02"/> <FORM lob="BO" form_name="AI OM 98"/> </forms> I need to sort the FOR...

xPath: Select parent element only if child element doesn't contain a certain value

Given this: <element_1> <element_2>Text</element_2> <element_3> <element_4> <element_5>Text with @ in Value</element_5> </element_4> <element_4> <element_5>Test Text</element_5> </element_4> </element_3> <element_6> <element_7> <eleme...

XSL XML banner ok in IE/Firefox not showing in Chrome

I have a following code: <script type="text/javascript"> if (window.ActiveXObject) { var xml; xml=new ActiveXObject("Microsoft.XMLDOM"); xml.async=false; xml.load("http://www.mypage.com/some.xml"); var xsl = new ActiveXObject("Microsoft.XMLDOM") xsl.async = false xsl.load("http://www.mypage.com/some.xsl") document.write(xml.transfor...