xml

SSIS XML Config File Location

I'm planning to use XML configuration files to run SSIS jobs on both development and production servers. I'll be using the SQL Server to store the SSIS packages. I'm wondering if there's a standard place to store the XML files. There's no need to create a project folder for the packages since they'll be stored in the database. So is ...

How to add a namespace to an attribute in lxml

I'm trying to create an xml entry that looks like this using python and lxml: <resource href="Unit 4.html" adlcp:scormtype="sco"> I'm using python and lxml. I'm having trouble with the adlcp:scormtype attribute. I'm new to xml so please correct me if I'm wrong. adlcp is a namespace and scormtype is an attribute that is defined in t...

error on getAttribute while parsing an xml document in Internet Explorer

Hi All, I'm calling a webservice from javascript and then parsing the xml and rendering tables. All is well in firefox, but in IE its a different story. The problem seems to be on this this line var count = result.childNodes[0].getAttribute('Count'); Is there an IE friendly way to get an xml attribute in javascript? the rest of th...

C# Find/Replace Credit Cards In XML String

I receive rather long XML strings as output from a third party and some of the fields represented in the XML may contain credit card numbers. I do not know the node/element/attribute names ahead of time. What would be the simplest method for finding and replacing card numbers with a placeholder in C#? String functions? Regex? Edit: ...

Parsing XML Data with LINQ

I am new to LINQ and there is an urgent need to finish this project quickly. I need to return the id with the correct price information for todays date for each MPrice. Any advice is well appreciated! Here is an example of the XML: <Pricing> <MPrice> <Id>0079</Id> <Price> <Price>31.25</Price> <StartDt>2009-8...

Illegal characters in path error while parsing XML in C#

Hi, I'm getting an "Illegal characters in path error" while using XMLTextReader method. Basically, I'm sending a long URL to tr.im, and tr.im sends the response as an XML stream, which I'm trying to parse but I get the above mentioned error. Can you guys guide me as to why I'm getting this error and where I'm going wrong? Here's the co...

Can I use XPath functions with XPathNavigator?

I've got an XPathNavigator at the root of a document. Several levels down, there's a group of numeric values that I want to sum. I could always loop through the nodes and add them myself, but since I knew the XPath spec included a sum function, I decided to try to use that. I'm running into an error. System.Xml.XPath.XPathException - Ex...

How do I query an XML field in SQL

This is the contents of my XML field in SQL: - <TestingConfig xmlns="http://tempuri.org/TestingConfig.xsd"&gt; `- <Config>` `<ConfigId>75</ConfigId>` `<PlaceId>2</PlaceId>` `<Identifier>05</Identifier>` `<Name>TEST1</Name>` `</Config>` `- <Config>` `<ConfigId>76</ConfigId>` `<PlaceId>2</...

How do I add an xml file to my project?

I'm trying to start out with LinqtoXml. I have added (I think) the right namespaces XElement contactsFromFile = XElement.Load("App_Data/test.xml"); Doesn't work... I get a "Could not find a part of the path 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\App_Data\test.xml'" error... Please help. ...

What is the benefit of XmlRpc over plain XML?

My company has been using XmlRpc for a while, but lately I'm wondering what the benefit of XmlRpc over plain XML. Firstly, it's horrible "obese", consider: <struct><member><name>ROOM_ID</name><value><int>1</int></value></member> <member><name>CODE</name><value><string>MR-101</string></value></member> <member><name>NAME</name><value><s...

Can you consume xml from access?

I'm researching the viability of a planned project that is to consume some data from a web server. Not being an access developer myself I wanted to know: Is it possible to consume xml from an access database? Can xml be consumed over an authenticated connection? Can xml be consumed over an encrypted connection (https)? What are the 'g...

Codeigniter + jquery: specify MIME type text/xml in ajax request response

I am making an ajax request from a jquery script to one of my ajax controllers in codeigniter. This process works fine when using data type json. However, when I want to send xml back from the server, the jquery documentation says that the server must specify a MIME type of text/xml. How do I do this with codeigniter. My ajax call loo...

How to read from xml file without /n/t/t myValue \n\t\t

Im reading from a xml and my values seem to come all right except with \n\t\t wrapping them... presumably something to do with spacing and stuff... how do i tell C# to ignore this? ...

Getting XML keys and values easily in PHP

I'm working with various XML inputs and outputs and simply want to grab the keys and values like you can with an array. Is there a simple function that can convert xml to an array or access the keys and values or am I going about this completely the wrong way? <?php $xmlstr = " <key> <parent1> <child1>val1</child1> <child...

PHP Parsing Case Sensitivity

I'm parsing a file that is set up like so: <blah-name name="Turkey"> <blah-city name="Test"/> <CAPS> <type type="5"> <type-two type="6"> </CAPS> At the top of my file, I create $xmlobj, like so: $xmlobj = simplexml_load_file("TEST.XML"); I'm then inserting the values into a table by creating a class that takes all of these as p...

xml parsing in iPhone-sdk 3.0

// ResxmlParser is globally declared as NSXMLParser -(void)parsingXML:(NSString *)resXml { NSData *xmlNsData =[resXml dataUsingEncoding:NSASCIIStringEncoding]; ResxmlParser = [[NSXMLParser alloc] initWithData:xmlNsData ]; [ResxmlParser setDelegate: self]; [ResxmlParser setShouldResolveExternalEntities: YES]; [ResxmlParser parse] ...

vbscript traverse through xml node- dynamic if else, node count detection

myXML= "<?xml version=1.0 encoding=iso-8859-1 ?>" & vbcrlf & _ "<shippingRates code=fedex >" & vbcrlf & _ "<errorMsg>" & vbcrlf & _ "Sorry, no rates returned." & vbcrlf & _ "</errorMsg>" & vbcrlf & _ "</shippingRates>" & vbcrlf & _ "<shippingRates code=CUSTOM >" & vbcrlf & _ "<shippingRat...

XslCompiledTransform output as XPathDocument

I am trying to use a XslCompiledTransform, and use the output as a XPathDocument. Any Ideas? ...

Load Multiple XML Elements into Object using Serialization in C#

I am trying to load multiple elements with the same name from XML into a class using deserialisation in C#. Everything in my example loads fine but the array elements (Element3) are not populated. Code: class Program { static void Main(string[] args) { FileStream file = new FileStream("service.xml", FileMode.Open); ...

Java properties - .properties files vs xml?

I'm a newbie when it comes to properties, and I read that XML is the preferred way to store these. I noticed however, that writing a regular .properties file in the style of foo=bar fu=baz also works. This would mean a lot less typing (and maybe easier to read and more efficient as well). So what are the benefits of using an XML file?...