xml

Wikipedia with Python

Hello, I have this very simple python code to read xml for the wikipedia api: import urllib from xml.dom import minidom usock = urllib.urlopen("http://en.wikipedia.org/w/api.php?action=query&titles=Fractal&prop=links&pllimit=500") xmldoc=minidom.parse(usock) usock.close() print xmldoc.toxml() But this code returns with ...

XPath-Problems when selecting a attribute of a XML-Tag

Hi guys, I could use a little help with an XPath-Expression. check the code below; how do I select the attribute "idc" at the shown point? <!-- XML-Code --> <pictGaleList> <item> </item> <dateItem> <ImageDate idc="20"> 20/04/2010 </ImageDate> </dateItem> </pictGaleList> <!-- XSLT --> <xsl...

Passing parameters in REST? can I only pass strings or xml is allowed?

I have a customer table which consists of almost a 50++ fields. I was just thinking if would it be feasible if I pass these through a XML formatted text since their are a lot of parameters Sample Below: [OperationContract] [WebInvoke(UriTemplate = "new/customerxml/", Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFor...

Add documents using c#

I am trying to add document to the index using c# (xml) but I am always getting error 400 (Bad request). Any ideas what I am doing wrong? Code: private static string GetXml() { XDocument document = new XDocument( new XDeclaration("1.0", "UTF-8", "yes"), new XElement("add", new XEl...

How to link up XML file with XSLT file?

The examples at http://en.wikipedia.org/wiki/XSLT or http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&amp;xsltfile=cdcatalog seem to be independent XML and XSLT files. Don't they have to be linked? Or do you somehow put them into a same file? Otherwise, how does one file know how to suck in data from the other file? ...

XML Parsing failed

I have this in a XML doc. <userdata name='filter'>&SearchExpression[0].Key=Id&SearchExpression[0].Value=1&</userdata> The value is a query which will be added to an url. It keeps failing to parse. It says the document isn't well formatted. The parser is pointing at the bracket "[" Could the bracket causing the error ? How can I pa...

How to loading XML files from a file

my xml is bellow: <Demo> <ClientCompanyId CompanyId="1"> <MyMenu> <module Text="Basic Settings" ModID="Mod1" ModuleID="1" MenuType="0" Perm="False"> <menu Text="Forms" MID="1-1" ParentID="Mod1" MenuDescription="Mod" ModuleID="1" MenuType="0" Perm="False"> <Leaf Text="LookUp" MID="1-3" ParentID="1" MenuDescription="" ModuleID="1" MenuTyp...

Populating parent + child objects from SQL Server 2008 (via XML?)

I have simple DAL that consists of a SalesEnquiry object, which includes a List<T> of a Vehicle object, which is used to process incoming enquiries (XML) and write them to a DB. So far so good. However, I'm writing another app that further processes data in this DB, so I'm wanting to use these same DAL objects to retrieve and manipulate...

Serialize to XML using boost::serialization

Hi, This is a newbie question. I am trying to serialize some objects to XML, but the resulting XML contains a boost serialization signature, version information, class id, ...etc. that I do not need. Is there a way to get rid of them without post-processing the xml message? #include <fstream> #include <iostream> #include <boost/archive...

XmlSerializer special characters

Hi All, Currently I have the following code: namespace ConsoleApplication2 { class Program { static void Main(string[] args) { var myObject = new MyObject() {Text = "€ 232.22"}; StringBuilder sb = new StringBuilder(); var xmlWriterSettings = new XmlWriterSettings(); ...

Can PHP communicate with XSLT?

I want to use a combination of xml & xslt as a templating system. The question that I want answered is: can xslt and PHP communicate with each other (i.e share variables)? ...

Retrieve XML from https using WebClient/HttpWebRequest - WP7

I'm trying to retrieve an XML document from a server and store it locally as a string. In desktop .Net I didn't need to, I just did: string xmlFilePath = "https://myip/"; XDocument xDoc = XDocument.Load(xmlFilePath); However on WP7 this returns: Cannot open 'serveraddress'. The Uri parameter must be a relative path po...

android: dump data from local xml file to sqllite database

How can I copy my data from xyz.xml in my assets dir to my sqllite db during development in android platform ...

How do I find a XML node by path in Linq-to-XML

If I get the path to a specific node as a string can I somehow easily find said node by using Linq/Method of the XElement ( or XDocument ). There are so many different types of XML objects it would also be nice if as a added bonus you could point me to a guide on why/how to use different types. EDIT: Ok after being pointed towards XPat...

How to AspxMenu fill from xml file

On my page I have two AspxMenu.Click on Master Menu correspondent value will show on Child menu XML syntax: <Demo> <ClientCompanyId CompanyId="1"> <MyMenu> <module Text="Basic Settings" ModID="Mod1" ModuleID="1" MenuType="0" Perm="False"> <menu Text="Forms" MID="1-1" ParentID="Mod1" MenuDescription="Mod" ModuleID="1" MenuType="0" Perm...

Where to save large blog posts data -in File or database?

I am developing one Blog Website and I was wondering how to save the large blog post data - in a XML file, as a HTML file or directly in database. Any suggestion? ...

Turn rows into columns in XSL:FO

Trying to create a table where rows are turned into columns so that I can logically group the columns in XML. The XML s something like this: <root> <field name="field1"> <string>field1.row1</string> <string>field1.row2</string> <string>field1.row3</string> <string>field1.row4</string> </field> <field nam...

how to store data in xml file from textbox in html.

how to store data in xml file from textbox in html. ...

Xml DeSerialization from an internal node

I'm working on getting my .net object serialized\deserialized. As a requirement for our XML files, the object must be inside a master node named "MyCompany", here is an example for the file: <?xml version="1.0" encoding="utf-8"?> <mycompany> <station> <serial>VAA008090067</serial> </station> </mycompany> I'm running into an i...

preserve html content when parsing xml file

I have a xml file <text> <defalut>This file has the following features:</defalut> <value> <ul> <li><info>CSS text formatting </info></li> <li><info>Text loaded from a XML</info></li> <li><info>Scrolls with easing</info></li> <li><info>Mouse wheel supported</info></li> ...