xml

simplexml_load_file and encoding problem

SimpleXML will convert all text into UTF-8, if the source XML declaration has another encoding. So, all the text in the resulting SimpleXMLElement will be in UTF-8 automatically. In my case the source has the following XML decl: <?xml version="1.0" encoding="windows-1251" ?> What should I do so as to get normal output? Because, as yo...

eclipse xml editor inserts tabs for spaces

I find that the Eclipse XML editor always inserts tabs for spaces even if you have the "Insert spaces for tabs" option checked under Window->Preferences->General->Editors->Text Editors. You can open any XML file, and then do CTRL-SHIFT-F to format the file and you'll see this behavior (all your spaces will be replaced with tabs where ap...

Help me clean some ugly XML

I'm getting this XML from a service that I need to deal with. I'm not much on XML Schema or Namespace fu, but to me it looks a mess. Can someone take a look at it and tell me how to make it nicer? http://gist.github.com/325952 I know that the namespace definitions can be declared in the first line, and not on every line. Is there an...

SSIS using XML and using exiSt DB

Would you please help me in wriritng simple student information system using XML?? After that I will using Native XML Database like exiSt in building that system ... ...

XML Parsing: Checking for strings within string C++

I have written a simple C++ shell program to parse large XML files and fix syntax errors. I have so far covered everything I can think of except strings within strings, for example. <ROOT> <NODE attribute="This is a "string within" a string" /> <ROOT> My program loops through the entire xml file character by character(keeping only ...

Windsor XML configuration of generics

Hi everybody! How do i setup the configuration in XML (for Windsor Castle) for the following class? public class Repository<T> : IRepository<T> where T : class { .... } I know how to do it in code but i must use XML file Thanks in advance ...

Help with JQuery XML

I found this code but its not working... any suggestions the parsexml is never being called $(document).ready(function(){ $.ajax({ type: "GET", url: "menuitems.xml", dataType: "xml", success: parseXml }); // fourth example $("#black").treeview({ persist: "location", collapsed: true }); })...

Parsing XML in C from a DTD and building a linked-list accordingly...

I'm trying to parse an XML file using C. The DTD for this XML file is fairly simple. It's basically a bunch of key-value pairs, with support for arrays as well. I've found XML parsers like Mini-XML and AsmXml, but they don't seem to support building a linked-list of the XML file based on the DTD. Is there an XML parsing library availab...

How do acquire a xml string for a child using msxml4?

Using MSXML4, I am creating and saving an xml file: MSXML2::IXMLDOMDocument2Ptr m_pXmlDoc; //add some elements with data SaveToDisk(static_cast<std::string>(m_pXmlDoc->xml)); I now need to acquire a substring from m_pXmlDoc->xml and save it. For example, if the full xml is: <data> <child1> <A>data</A> <One>da...

invalid byte 2 of 2-byte UTF-8 sequence

I am trying to parse an XML file with , but ran into an error message "invalid byte 2 of 2-byte UTF-8 sequence. Does anybody know what caused this problem? Thanks. ...

How to respond to HTTP GET with .net and XML

How to respond to HTTP GET with c#/.net and XML What I am trying to is when another service call posts to a get with say 5 parameters. This service would respond with an appropriate xml file. Is WCF the way to go? Any good examples out there? Is this way easier/faster on some other platform? ...

DTD parser for Django/Python

Is there a tool that can generate Django models from a DTD? Failing that, are there any decent DTD parsers available for Python? ...

LINQ: Sum values of XML nodes in C#

I have an XML document and I would like to sum all elements of a specific name. How do I do this? ...

How do you extract a specific element out of an XDocument?

I have the following XDocument: <SomeDoc Id="73" Protocol="rahrah" xmlns="http://schemas.company.com/rah/rah2/2005/"&gt; <Prop1>11111</Prop1> <Prop2>77777</Prop2> <Prop3>88888</Prop3> </SomeDoc> And I want to extract the value in Prop1. I use the following code: var prop1 = xml.Element("Prop1"); But prop1 is being set to ...

how to get namespace prefixes from XML document, using MSXML ?

For example, In this document < ?xml version="1.0" ? > < SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://opcfoundation...

Modifications of app after submission

Hi guys, Sorry I am super newb', I would like to know what is the best way / what is feasible in terms of updating the content of an iPhone application, in the following case: application has been submitted and approved i need sudden change of text in one of the section i need sudden change of image in one of the section My first id...

how can I validate XML on firefox?

Firefox does not read an external DTD and it does not provide schema evaluation even when an external schema definition is included in the XML file. If I want to validate the XML against a DTD or an XSD at the Firefox browser directly or by using JavaScript, what should I do? ...

insert/update/delete with xml in .net 3.5

Hello guys, i have "UserProfile" in my site which we have stored in xml fromat of xml is as below <UserProfile xmlns=""> <BasicInfo> <Title value="Basic Details" /> <Fields> <UserId title="UserId" display="No" right="Public" value="12" /> <EmailAddress title="Email Address" display="Yes" right="Public" value="vrun...

Problems extracting information from RSS feed description field

Hi, I've built an iPhone application using the parsing code from the TopSongs sample iPhone application. I've hit a problem though - the feed I'm trying to parse data from doesn't have a separate field for every piece of information (i.e. if it was for a feed about dogs, all the information such as dog type, dog age and dog price is con...

how to get CDATA in xml file using tinyxml library. If possible give a 2-3 line code snippet?

how to get CDATA in xml file using tinyxml library. If possible give a 2-3 line code snippet? ...