I'm looking for the best way to do some sort of "smart" HTML encoding.
For instance:
From: <a>Next >></a> to: <a>Next gt;gt;</a>
From: <p><a><b><< Prev</b></a><br/><a>Next >></a></p> to: <p><a><b><< Prev</b></a><br/><a>Next gt;gt;</a></p>
So only the non XML / HTML part of the text would be encoded as if HtmlEncode is called.
A...
I've created in my application the ability for developers to create WPF forms by writing an XML file.
I would like to now write a XML Schema file (.xsd) to validate this XML file so that developers can validate their Form XML before it is put into the system, and so they can get intellisense based on the XML Schema while they develop it...
Hi,
Im trying to construct a powershell script that uses some XML. I have a XML document where I try to add some values with email addresses. The finished xml document should have this format:
(I'm only showing the relevant part of the xml here)
<emailAddresses>
<value>[email protected]</value>
<value>[email protected]</value>
<va...
I am using VSTS2008 + C# + .Net 3.0. I am using below code to serialize XML, and my object contains array type property, but there some additional elements' layer (in my sample, MyInnerObject and MyObject) generated which I want to remove from the generated XML file. Any ideas?
Current generated XML file,
<?xml version="1.0"?>
<MyClass...
Hello everyone,
I am using VSTS2008 + C# + .Net 3.0. I am using below code to serialize XML, and my object contains array type property, and I want to add an additional elements' layer ("MyInnerObjectProperties" element layer in my expected results below, and I want to make "MyInnerObjectProperties" element as parent element for all My...
I am using VSTS2008 + C# + .Net 3.0. I am using below code to serialize XML, here is my current code and serialized XML file. My purpose is I want to make MyInnerObjectProperties belongs to a special XML namespace (http://foo/2009) and making this namespace as default namespace. Any ideas how to implement this?
Current output:
<?xml ve...
I want to read lots of data(single column nvarchar(max)) from SQL Server 2005 and deserialize it to an object. We are currently using the following, but this is not fast enough is there a better/efficient way to do it?
using(MemoryStream stream = Encoding.UTF8.GetBytes((string)cmd.ExecuteScalar()))
{
XmlTextReader xmlReader;
DataCon...
I'm trying to list vacancies in a asp:GridView using an XML_feed through an asp:XmlDataSource. This should be kinda simple, but I'm missing something with my XPath-expressions..
This is a short example of what I'm trying to achieve (list title of vacancies):
<asp:XmlDataSource ID="XMLsource" DataFile="http://demo.easycruit.com/export/...
Hi, I've got to write a multithreaded chat program, using a server and clients but each message sent has to be in XML.
Is it simpler/easier just to write out all the code in java, and then try and somehow alter it so the messages are sent in XMl format, or would it be simpler just to try and go for it in XML and hope it works. I'll ad...
I am a classic ASP developer. I know, I should learn .NET, but only have a couple more years left at this. I would consider myself advanced.
I have a third party application that will export data to a web service if I develop it. I am curious to see I can build it in ASP rather than having to learn .NET.
My problem is I haven't figured...
Hello!
I have something like that as input:
<root xmlns="urn:my:main"
xmlns:a="urn:my:a" xmlns:b="urn:my:b">
...
</root>
And want to have something like that as output:
<MY_main:root xmlns:MY_main="urn:my:main"
xmlns:MY_a="urn:my:a" xmlns:MY_b="urn:my:b">
...
</MY_main:root>
... or the other way round.
How do ...
Hi,
I am working in STAF and STAX. Here python is used for coding . I am new to python.
Basically my task is to parse a XML file in python using Document Factory Parser.
The XML file I am trying to parse is :
<?xml version="1.0" encoding="utf-8"?>
<operating_system>
<unix_80sp1>
<tests type="quick_sanity_test">
<prerequisi...
I have a source document:
<?xml version="1.0"?>
<source>
<ItemNotSubstituted/>
<ItemToBeSubstituted Id='MatchId' />
</source>
And a stylesheet containing content I want to substitute into the source:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes"...
How do I add another element/childnode to a specific parent node in an XML file?
Specifically a new video object to the media node.
I want to turn this:
<?xml version="1.0" encoding="utf-8" ?>
<media>
<Video name="Gladiator">
<English>path1</English>
<Chinese>path2</Cinese>
<French>path3</French>
</Video>
<Vi...
I am working on a project where we need to save data in an XML format. The problem is, over time we expect the format / schema for our data to change. What we want to be able to do is to produce scripts to migrate our data across different schema versions. We distribute our product to thousands of customers so we need to be able to ru...
Is there an easy way to convert a Nokogiri XML document to a Hash?
Something like Rails' Hash.from_xml.
...
I have an xml document from which i want to remove white spaces and cartridge returns. how can i get the modified xml using c#
...
I'm writing a template engine (something that will add data to a template to produce a document, like that used in Active Server Pages or JavaServerPages or PHP - or even shell/bash scripts, ant or Word form letters).
Some examples:
${yourVariableHere}
<TMPL_LOOP NAME=EMPLOYEE_INFO>
<%= toStringOrBlank( "expanded inline data " + 1 ) %>...
I am trying to deserialize an Atom xml generated by one of the internal systems. However, when I try:
public static MyType FromXml(string xml)
{
XmlSerializer serializer = new XmlSerializer(typeof(MyType ));
return (MyType) serializer.Deserialize(new StringReader(xml));
}
it throws an exception on the defin...
Hi,
I have a response XML something like this -
<Response> <aa> <Fromhere> <a1>Content</a1> <a2>Content</a2> </Fromhere> </aa> </Response>
I want to extract the whole content from <Fromhere> to </Fromhere> in a string. Is it possible to do that through any string function or through XML parser?
Please advice.
...