xml

How to easy serialize an xml file in objects with XStream library

I have the below xml file: <?xml version="1.0" encoding="UTF-8"?> <!-- This is a sample netbeans project file for a Squawk project. You may edit it freely, it doesn't affect the ant-powered build. --> <project xmlns="http://www.netbeans.org/ns/project/1"&gt; <type>org.netbeans.modules.ant.freeform</type> <configur...

Get distinct node values in XML with XSL

How can I find all the distinct names in my XML by using XSL? <NewDataSet> <SearchResult> <Name>HAREDIN </Name> <Surname>FEIMI</Surname> <FathersName>QAMIL</FathersName> <Birthdate>1949-06-13T00:00:00+02:00</Birthdate> <CustomerSegment>Individe Standart </CustomerSegment> </SearchResult> <SearchResult> <Nam...

What to use to save important generated data as-is? PDF/XML/DB or other?

My question is about generating invoices and receipts. The said bills use rates, names and values from a database. If the sources for generating the receipt stay unchanged, one can generate the same receipt dynamically each time. However, since names, rates and values may be changed or removed, the receipt also changes with time, i.e dya...

How to bind AspxMenu by .xml file value

XElement xml = new XElement("contacts", from c in db.Categories orderby c.CategoryID select new XElement("contact", new XAttribute("contactId", c.CategoryID), new XElement("firstName", c.CategoryName), new XElement("lastName", c.Desc...

Java DOM - Inserting an element, after another.

Given the following XML file: <?xml version="1.0" encoding="UTF-8"?> <process name="TestSVG2" xmlns="http://www.example.org" targetNamespace="http://www.example.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <sequence> <receive name="Receive1" createInstance="yes"/> <assign name="Assign1"/> <i...

Simplify PHP DOM XML parsing - how?

Hi coders! I've spent whole days with PHP's DOM functions but i can't understand how it works yet. :( I have a simple XML file that looks okay but i cannot use it how i think when i've created it's structure. Sample XML fragment: -pages //root element -page id="1" //we can have any number of pages -product id="364826" //we...

How to add attributes to xml using XmlDocument in c# .net CF 3.5

Hi, I need to create an attribute "abc" with the prefix "xx" for an element "aaa". The following code adds the prefix but it also adds the namespaceUri to the element. Required Output: <mybody> <aaa xx:abc="ddd"/> <mybody/> My Code: XmlNode node = doc.SelectSingleNode("//mybody"); XmlElement ele = doc.CreateElement("aaa"); X...

Using SAX to parse common XML elements

I'm currently using SAX (Java) to parse a a handful of different XML documents, with each document representing different data and having slightly different structures. For this reason, each XML document is handled by a different SAX class (subclassing DefaultHandler). However, there are some XML structures that can appear in all these ...

XQuery vs OpenXML in SQL Server

I have this XML in a SQL Server table: <root> <meetings> <meeting> <id>111</id> <participants> <participant><name>Smith</name></participant> <participant><name>Jones</name></participant> <participant><name>Brown</name></participant> </participants> </meeting> <meeting> <id>22...

Firefox Add-ons, How to execute javascript function onLoad?

I'm new to Firefox Add-ons. I want to create a simple Firefox add-ons that append HTML element to a page automatically on document Load. Honestly, I want to add additional BBCODE/smiley toolbar to the any existing textarea. I got an example of xul (xml) file: <popup id="contentAreaContextMenu"> <!-- some code here --> </popup> ...

Sort XML file based on XSD format in .Net

I have a requirement to generate XML, validate against an XSD and (if valid), send the XML to a third party. My problem is that generating the nodes of the XML file in the correct order (as the XSD defines it) is very difficult with my current scenario. Writing the code to manually add the nodes in the correct order would mean a lot of ...

visualizing multi layered xml data in visual studio

If I have a multi layered XML Data file of the following type <versions> <version id="1"> <features> <feature id="1"> <deatil>aaaaa</detail> </feature> <feature id="2"> <deatil>bbbb</detail> </feature> </features> </version> </versions> I want to build an interface in visual studio using ajax or asp.ne...

WPF, display attribute value in TreeView instead of node name

If I have the following data template for a TreeView, what do I need to change so that each TreeViewItem shows the value of the name attribute on each XML node, instead of the node name? <HierarchicalDataTemplate x:Key="NodeTemplate"> <TextBlock x:Name="tb"/> <HierarchicalDataTemplate.ItemsSource> <Binding XPath="child::...

How can I change parameter value in XML using Perl ?

My XML file looks like this: <Configuration> <Parameters> <Component Name="Aas"> <Group Name="PrivilegesMapping"> <Parameter Name="PrivilegesLoaderInterval"> <Description> The interval (in minute) </Description> <Type...

How to avoid IE warning message when consuming a web service using jQuery

Hi, someone kindly posted the following solution to consuming web services from this question at this link: http://stackoverflow.com/questions/230401/how-to-use-jquery-to-call-an-asp-net-web-service/3407545#3407545 function InfoByDate(sDate, eDate){ var divToBeWorkedOn = '#AjaxPlaceHolder'; var webMethod = 'http://MyWebService/Web.asm...

Fetching xml with GM_xmlhttpRequest

I'm trying to retrieve a page with greasemonkey and then extract a link from it, inserting the link into the current page. I'm having some trouble with: GM_xmlhttpRequest({ method: "GET", url: "http://www.test.net/search.php?file=test", onload: function(data) { if (!data.responseXML) { data.responseXML = new DOMParser...

Combine XML from T-SQL

Hi All, I have two separate tables TVs and Receivers that I am using the FOR XML PATH commands to build XML off of. My issue is that I want to combine the output of my TV XML Build with my Receiver XML Build to create one XML output. So I would have something like this(Which allows me to keep the TVs and Receivers Tags Separate within...

XPath Node to String

How can I select the string contents of the following nodes: <span class="url"> word <b class=" ">test</b> </span> <span class="url"> word <b class=" ">test2</b> more words </span> I have tried a few things //span/text() Doesn't get the bold tag //span/string(.) is invalid string(//span) only selects 1 node I am using ...

saving the xml data over network tcp

I have devices. Each one sends data to (server IP-address) over a particular port in a random time. Because it's an alarm device and it’s possible that more than one device fired in the same time. The data is in XML Format. Now I already got a small windows application which listen for the data But I got a few problems 1 problem i...

XmlReader read document with unescaped &s

I am trying to parse an XMl document that i received into a string from a web service call. String content = ...;//long xml document using(TextReader reader = new StringReader(content)) using(XmlReader xml_reader = XmlReader.Create(reader, settings)) { XML = new XPathDocument(xml_reader); } however i get an exception : An error...