xml

Modify XML existing content in C#

Purpose: I plan to Create a XML file with XmlTextWriter and Modify/Update some Existing Content with XmlNode SelectSingleNode(), node.ChildNode[?].InnerText = someting, etc. After I created the XML file with XmlTextWriter as below. XmlTextWriter textWriter = new XmlTextWriter("D:\\learning\\cs\\myTest.xml", System.Text.Encoding.UTF8); ...

What is the correct syntax for XSD to restrict attrributes values in the elements list?

What is the correct syntax for XSD schema to define the following restriction: In the list of elements we have to specify that attribute can contain value of "c" unlimited number of times, but value of "b" - the zero or only one time. For example, the correct xml looks like this: <root> <elem atr="c">111</elem> <elem atr="c">222</elem...

Count end points in XML using XSL

I want to be able to count "end points" in an XML file using XSL. By endpoint I mean tag's with no children that contain data. i.e. <xmlsnippet> <tag1>NOTENOUGHDAYS</tag1> <tag2>INVALIDINPUTS</tag2> <tag3> <tag4> <tag5>2</tag5> <tag6>1</tag6> </tag4> </tag3> </xmlsnippet>...

Search for contents inside a website

Anybody please give some useful links on this topic.i need to create a content search for my website.. i have tried google but not get useful materials on this topic...please help me ...

XSLT: Get node where one certain value is present

Hi there I have the following XML: <data> <page id="1118"> <itms> <values> <value>1104</value> </values> </itms> </page> <page id="1177"> <itms> <values> <value>1273</value> <value>1215</value> </values> ...

Creating CCD document from scratch (JAVA)

Hi, I'm trying to build a CCD document. My application has some raw data which has to be converted into a CCD document. And I've no idea where I should start from!! From this thread I learned that MDHT and Braid can be used to create a CCD document. But thats all I could grasp. I thought that I need a CCD XSD, a java library which will...

Filtering Wikipedia's XML dump: error on some accents

I'm trying to index Wikpedia dumps. My SAX parser make Article objects for the XML with only the fields I care about, then send it to my ArticleSink, which produces Lucene Documents. I want to filter special/meta pages like those prefixed with Category: or Wikipedia:, so I made an array of those prefixes and test the title of each page ...

XmlSerializer constructor error with class derived from a base class

Hi @all the following code specifies a type "MyBase64Binary" which is derived from a base class "TestBase" using System; using System.Xml.Serialization; using System.Collections; using System.Xml.Schema; using System.ComponentModel; namespace Test { public class TestBase { public TestBase() { } } ...

Access XML file using PHP

Hello, I have a xml file which has an entry <content type="html"></content> Can I access it as echo $result->content; If not let me know , coz the above does not seem to be working, there are pics, which I want to display. Thanks Jean ...

XML to XAML conversion

Hi, We have about 1400 xml files which we use to store data around the look and feel of the controls used to load dynamically in winform applications. We want to convert these XML to XAML. Is there any easy way to get this done? ...

reading xml file inside a jar-package

Here's my structure: com/mycompany/ValueReader.class com/mycompany/resources/values.xml I can read the file in my Eclipse project, but when I export it to a .jar it can never find the values.xml. I tried using ValueReader.class.getResource() and ValueReader.class.getResourceAsStream() but it doesn't work. What's the problem here? H...

SOAP API reporting non-validating XML

I'm calling a SOAP webservice using Apache AXIS2 with ADB. Never mind the 64.000 line stub generated to send over two parameters + auth, I'm getting an obscure XML validation error. I'm sending this (username and password redacted): 2010-03-26 00:28:59,982 DEBUG httpclient.wire.content - >> "<?xml version='1.0' encoding='UTF-8'?><soap...

SQLServer:Namespaces preventing access to query data

Hi A beginners question, hopefully easily answered. I've got an xml file I want to load into SQLServer 2008 and extract the useful informaiton. I'm starting simple and just trying to extract the name (\gpx\name). The code I have is: DECLARE @x xml; SELECT @x = xCol.BulkColumn FROM OPENROWSET (BULK 'C:\Data\EM.gpx', SINGLE_BLOB) AS ...

How to escape the character entities in XML?

I want to pass XML as a string in an XML attribute. <activity evt="&lt;FHS&gt; &lt;act&gt; &lt;polyline penWidth=&quot;2&quot; points=&quot;256,435 257,432 &quot;/&gt; &lt;/act&gt; &lt;/FHS&gt;" /> Here the "evt" attribute is the XML string, so escaping all the less-than, greater-than, etc characters by the appr...

Extracting CDATA Using jQuery

It looks like this has been asked before, but the answers do not appear to work for me. I am outputting information from a local XML file, but the description elements is not being output because it is enclosed in CDATA - if I remove the CDATA portion then things work fine. Here is my code: $(document).ready( function() { $.get(...

using XPath how to select elements with absent attribute

I would like to select all elements that have certain attribute or don't have it at all: //job[@salary<"100" or !@salary] This code is not valid. Which one is? Thanks! ...

Most efficient way to store list structure in XML

Starting a new project and was planning on storing all of my web content in XML. I do not have access to a database so this seemed like the next best thing. One thing I'm struggling with is how to structure the XML for links (which will later be transformed using XSLT). It needs to be fairly flexible as well. Below is what I started with...

Linq to SQL Web Service XML

I built a .NET web service connecting to an SQL Server database. There is a web service call GetAllQuestions() that will not change. I saved the result of GetAllQuestions to GetAllQuestions.xml in the local application folder and set it to content. Normally I would get the result of the web service like this: var myService = new SATSer...

How do I parse an XML file that's on a different web server?

I have a list of training dates saved into an XML file, and I have a little javascript file that parses all of the training dates and spits them out into a neatly formatted page. This solution was fine until we decided that we wanted another web-page on another sever to access the same XML file. Since I cannot use JavaScript to parse a...

Jquery .wrapAll problem

Hi Guys, I'm parsing an xml file and I want to wrap children divs into a div called "new": I have something similar to below: function parseXml(xml) { $(xml).find("hotel").each(function() { $('<div class="wrapme"></div>').html($(this).find("hotel_name").text()).appendTo('#foo'); }); } $('.wrapme').wrapAll('<div class="group" />');...