473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

XML string to html

Hi,

I was wondering if someone could help me out with some sample code. I
am trying to convert and validate some xml text passed in as string.
The methods are as follows:

public string transform(string xml, string xsl)
{

}

public bool validate(string xml, string xsd)
{
}

All samples I have found load the xml and xsl using the load command,
but I'm passing it as a string. If anyone could help fill the blanks
I'd be appreciative.

Thanks.

Jul 27 '06 #1
1 1637


Spondishy wrote:

public bool validate(string xml, string xsd)
{
}

All samples I have found load the xml and xsl using the load command,
but I'm passing it as a string.
Are you using .NET 1.x or .NET 2.0? With .NET 1.x you need to use
XmlValidatingReader e.g.
XmlValidatingReader reader = new XmlValidatingReader(new
XmlTextReader(new StringReader(xml));
reader.Schemas.Add("targetNamespaceURN", new XmlTextReader(new
StringReader(xsd));
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jul 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sheela | last post by:
Hi all gurus in tha club, I scripted a prog that extract a string from an html page excluding all the tags. The problem is that it works quite slowly and I wanted to know if somebody of us as an...
3
by: Austin | last post by:
Hello I am wondering if anyone knows if there is a way to store string literals within an XML tag. For instance I would like to store HTML formatting data for an attribute but it keeps...
4
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the...
0
by: Christopher M. Lauer | last post by:
I have done my best to answer this question but can not find the proper set of commands. I would like to transform an xml file (in code behind) and display its output in a specific html tag,...
2
by: Dan Schumm | last post by:
I'm relatively new to regular expressions and was looking for some help on a problem that I need to solve. Basically, given an HTML string, I need to highlight certain words within the text of the...
3
by: keith | last post by:
Hi, I'm using WebClient to retrieve the contents of a particular page. I would like to get a string containing only the page's text and no html markup. How can I do this? Is there a class to...
6
by: tshad | last post by:
In my User control, I tried to do this: *************************************************************************** <Script runat="server"> Public ClientName As String = "<!-- #include file =...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
3
by: Just D. | last post by:
All, What's the simplest way to show my own HTML string on the ASPX page assuming that this page is just created using the wizard and it has nothing on it? We're free to use any control adding...
2
by: korean_dave | last post by:
How can i use the find() function on a string that is composed of tons of symbols that cause errors... THis is my string: find("<html><head><meta name="qrichtext" content="1" /><style...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.