xml

Working with the SQL Server XML data type

I've got a table which has a XML field. The typical XML it contains is; <things> <Fruit> <imageId>39</imageId> <title>Apple</title> </Fruit> <Fruit> <imageId>55</imageId> <title>Pear</title> </Fruit> <Fruit> <imageId>76</imageId> <title>Grape</title> </Fruit> </things> In my table i've got around 50...

Batch Element in Sharepoint to Delete a List item when you do not know the ID

I want to delete an item in a list when it matches some critera using UpdateListItems web service. I dont know the ID of the list item that I want to delete but do know the criteria. For example in SQL I could do: DELETE FROM listName WHERE LastName='Bauer' AND FirstName='Jack' How would you write a Batch Element to do this? Update ...

Producing XML from a multi-table join in SQL Server

Given a database schema with a parent table and two or more child tables. For example: Is it possible to create a query, using the for xml statement, that outputs the following XML: <?xml version="1.0"?> <person> <name>Joe Bloggs</name> <age>25</age> <address> <streetAddress>123 Test Street</streetAddress> ...

How to add a conditional Statement to a XML document ?

Hi , Is it possible to add a conditional statement to XML document ? Thank in advance ...

How do I insert sysdate into a column using ODP and an XML dataset?

I'm using Oracle's ODP.Net to manipulate records. When using the XML methods to insert and update records, I've run into a few problems. When I am inserting a new record, I'd like the value of one of the columns to come from a sequence (MySeq.nextval). I'd also like an UPDATE_DATE column to reflect sysdate. I've only seen examples of...

How to add an element using a custom SOAPHandler

This is related to a previous question. I've pulled out the main problem as I've updated much of the code but I still have an issue. How can I have a custom SOAPHandler class add a new element to a SOAP message? I need to add a username and password to the message. If I use: public boolean handleMessage(SOAPMessageContext context) {...

How to extract data from a LONG column holding XML strings

Here is my table MYTABLE(ID NUMBER(10), DATATYPE VARCHAR2(2 BYTE), XMLDATA LONG ) Note1: I cannot alter this table Note2: I'm using Oracle 10g Here is a sample of XMLDATA <myxml version="1"> <node1> <child1>value to get</child1> </node1> </myxml> I tried xmltype() but it's not working with a LONG type (ORA-0...

nested xml with linq in repeater

Hi, I've got a xml file that looks like this and I'm trying to get all the location attributes in a table cell. I managed to get the title and description but somehow fail to get all the locations within events. Can someone help me out on this? Cheers Terry What I've come up so far is the following var qListCurrentMonth = (from fee...

issue to get specific XML element value using C#

Hello everyone, Suppose I have the following XML document, how to get the element value for a:name (in my sample, the value is Saturday 100)? My confusion is how to deal with the name space. Thanks. I am using C# and VSTS 2008. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt; <s:Body> <PollResponse xmlns="http...

How to preserve newlines in CDATA when generating XML?

Hello, I want to write some text that contains whitespace characters such as newline and tab into an xml file so I use Element element = xmldoc.createElement("TestElement"); element.appendChild(xmldoc.createCDATASection(somestring)); but when I read this back in using Node vs = xmldoc.getElementsByTagName("TestElement").item(0); Str...

Change case of nodes in imported XML file via PHP preg_replace

I'm trying to process an imported XML file and make the text in one of the nodes <Name>SOMETHINGTOMAKELOWERCASE</Name> lowercase <Name>somethingtomakelowercase</Name> So far I got: $xml = file_get_contents($xmlfile); $xml = preg_replace('/<Name>(.*)<\/Name>/e', '<Name>' . strtolower($1) . '</Name>',$xml); fwrite(fopen($xmlfile, '...

Parsing XML Encoded in UTF-8

I am working with a Wikipedia XML dump that is encoded in UTF-8. Right now, I am reading in everything as std::string, so when I std::cout to the screen, foreign characters are displayed as jibberish. The actual parsing process only looks for ASCII characters though, but when I write the parsed file to disk, I want to preserve the fore...

how to query restful rails app with curl?

here's my problem.. resource: user method: create I call curl like this: curl -X POST -H 'Content-type: text/xml' -d '<xml><login>john</login><password>123456</password></xml>' http://0.0.0.0:3000/users but the params hash in rails look like this: {"xml"=> {"login"=>"luca", "password"=>"123456"}} I want it to look like this: {"lo...

Magento Custom Forms

I'm trying to build my own Request Catalog Form in Magento, heavily based on the Contacts module that comes out of the box. I've set up my XML files: ./app/etc/modules/RequestCatalog_RequestCatalog.xml ./design/frontend/default/{theme}/layout/requestcatalog.xml ./code/local/{namespace}/{module}/etc/config.xml In my config.xml, I set...

How to Parse XML file in c# (youtube api result)?

I'm trying to parse XML returned from the Youtue API. The APIcalls work correctly and creates an XmlDocument. I can get an XmlNodeList of the "entry" tags, but I'm not sure how to get the elements inside such as the , , etc... XmlDocument xmlDoc = youtubeService.GetSearchResults(search.Term, "published", 1, 50); XmlNodeList listNodes ...

How to I output org.w3c.dom.Element to string format in java?

I have an org.w3c.dom.Element object passed into my method. I need to see the whole xml string including its childnodes (the whole object graph). I am looking for a method that can convert the Element into xml format string that I can system.out.println on. Just println on the element object won't work because toString won't output the...

Error when converting XML from a CLOB column to XMLType colum

I'm trying to convert some xml data coming from a CLOB to a XMLType column. The XML have some accentuated characters as values (documents are written in french). Here is what the instruction looks like : insert into mytable (id, xmldata) values (p_id, xmltype(p_xmldata)); p_id and p_xmldata are variables previously extracted from th...

Construct PHP strings to time from XML

I'm trying to convert the following XML into a Time: <time hour="18" minute="05" timezone="Eastern" utc-hour="-4" utc-minute="00" /> I'm parsing the XML using SimpleXML, and storing that in a class. I also tried printing out the following: print strtotime($x->time->attributes()->hour . ":" . $x->time->attributes()->minute) . "<br>\...

Validating SOAP messages

I can't get any SOAP messages to validate as valid XML. For example, the SOAP message below I took off of Wikipedia and it failed the Validome validator (http://www.validome.org/xml/validate/). Is the validator wrong or is there a mistake in the SOAP file? If the validator is wrong can you suggest another? It should take schemas into a...

Parse XML iLO response file with Perl

I have the folowing XML file generated by my iLO HP server, Do you have any examples of how can i parse it ? See the example XML file below. I would like to extract fan speeds and temperatures from it. <?xml version="1.0"?> <GET_EMBEDDED_HEALTH_DATA> <FANS> <FAN> <LABEL VALUE = "Fan 1"/> <ZONE VALUE = "System"/> <ST...