xml

Linq to XML - way to write binary Data into XML

How to write binary data into XML using LINQ which is being read from registery. Eg: ήì\ÎQÝÜ$Ñ.Ì6Å·xxµ0©ÐQfô:S9}:&...... ...

Why is SelectSingleNode returning null?

I'm working with an XML document that contains a structure that looks similar to this: <MT> <Events> <event id="1"> <field name="blah" value="a_value" type="atype" /> . . . </event> </Events> </MT> I'm currently loading this from a file into an XML document in this fashion: XmlDocument xdoc = ne...

How do I insert a bit of XML into an XDocument using Visual Basic?

I'm trying to create a sitemap in an ASP.NET MVC project. This code in my Node controller... Function Sitemap() As ContentResult Dim db As New EfrDotOrgEntities Dim Nodes = db.Node.ToList Dim RequestUrl As Uri = Url.RequestContext.HttpContext.Request.Url Dim AbsoluteRoot As String = String.Format("{0}://{1}", RequestUrl...

Populating A Page with XML and Javascript/Jquery, checking if the url is the same as an xml tag

Hi, I need to create a javascript function that will write a page based on the url, so basically I am trying to create a javascript function that will check the url, and find the corresponding xml item from there. The reason behind this is so that the html page can just be duplicated, renamed, and the xml updated, and the page will fill...

reading CDATA with linq to xml

Hello Everyone, I have the following xml file and cannot seem to figure out how to get the value in the elements (which are buried in a CDATA). I am trying to use linq to xml for this. If someone knows how you would convert this into a "Product" object (assume we have a product object that has properties with the same names as the ele...

Dynamically rendering controls, determine type from string/XML File?

In an ASP.NET application, I'd like to dynamically render several controls with their properties coming in from an XML document. Here's the kicker: I want to be able to dynamically determine the type of control. So, in my XML document, I have something like this: <control> <id>myControl1</id> <type>CheckBox</type> <text>...

how do I make an element a child of itself in XML Schema?

I'd like the ability to have an arbitrary level of nesting children of the same parent element, e.g.: <path expr="/"> <path expr="usr"> <path expr="bin"> <path expr="X11" /> </path> </path> <path expr="var" /> </path> I'm writing the XML Schema file, and I'm at a loss as to how to represent this parent/child relati...

AS3 retrieving xml from aspx page

Hello all I'm an AS3 noob on training wheels... I have an XML Loader class which is doing what it's supposed to with a test.xml file, however I need the flash to read the xml written by an aspx file. So I tried: var urlRequest:URLRequest = new URLRequest("../xml/CaseStudyFlashAssets.aspx"); I get error #1090 (which I gather is bec...

Reading XML In Flash From An ASPX Page

Hi guys, I have created an aspx page which dynamicaly creates an xml string and posts it back to the client. protected void Page_Load(object sender, EventArgs e) { Response.Clear(); Response.ContentType = "text/xml"; Response.ContentEncoding = Encoding.UTF8; var flashAssets = Asset.GetScro...

How to filter with XPath on all elements without a specific attribute

My XPath is a little bit rusty... Let's say I have this simple XML file: <?xml version="1.0" encoding="utf-8" ?> <States xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <States> <StateProvince name="ALABAMA" abbrev="AL" /> .... <StateProvince name="AMERICAN SAMOA" abbrev="AS" territ...

how to load a hashtable from a simple xml file using xmltextreader

Hi, using xmltextreader, how would I load a hashtable. XML: <base><user name="john">2342343</user><user name="mark">239099393</user></base> This was asked before but it was using some funky linq that I am not fully comfortable with just yet. ...

Strategy for building menus with multiple, overlapping roles

I have a system for students, instructors, and administrators. Sometimes an instructor can also be an administrator. I intend to store menus and submenus in XML. Should I store admin and instructor menus in separate nodes, and then combine them when I render, or should I have one master menu with roles attached that shows all the option...

Is it possible to redefine something defined as xsd:element?

I need to extend an element in an XSD schema. In the original schema, the element is defined as: <xsd:element name="RemarkText"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="C-Infinite"> <xsd:attribute name="IdRef" type="IDREF" use="required"/> </xsd:extension> ...

How do you do an HTTP Put?

I feel like an idiot asking this. In fact, after typing the title, StackOverflow barks at me, "That's not a very good title. Can you add some more unique words to it?" No I can't, SO; sorry. Here we go: We have this software that has a webservices component. Now, the administrator of this system has come to me, wanting to import data i...

Problem deserializing validated XML, can't convert to/from array

I'm a bit out of my element. I've used xsd.exe to create an xsd schema from an xml file, and then to create a C# class from that xsd. That all seems to work fine. At the moment I'm just trying to get the XML deserialized. The file I'm deserializing if the very same file I used to build the class originally. Here's my code: String xsdPa...

trouble resolving location in <xs:import > element in C#

I'm using an XML schema document to validate incoming data documents, however the schema appears be failing during compilation at run time because it refers to a complex type which part of an external schema. The external schema is specified in a element at the top of the document. I had thought it might be an access problem, so I moved...

Xpath visualization

I am looking for a XML tool which does the following things. Allows me to enter xpath expressions and highlights the nodes selected Assists me in creating complex xpath expressions. What are other people using out there? I've used something from source forge but it only selects one matched node. ...

Dom4j rule does not match all expected nodes

I'm using dom4j's rules api to fire an action if the predefined pattern //authorize matches an element in the following xml snippet. <authorize role_required="admin"> <node title="node which is visible only to admin" path="" > <authorize role_required="admin"> <node title="node which is visible only to admin" path=""/> ...

Save xml string or XmlNode to text file in indent format?

I have an xml string which is very long in one line. I would like to save the xml string to a text file in a nice indent format: <root><app>myApp</app><logFile>myApp.log</logFile><SQLdb><connection>...</connection>...</root> The format I prefer: <root> <app>myApp</app> <logFile>myApp.log</logFile> <SQLdb> <connection>....

crossdomain.xml not working

Hello, I needed to add a crossdomain.xml file to my website so that an embeddable flash widget can access its rss feed. The widget is throwing an error, and it looks like it's because my crossdomain.xml file isn't being seen as a valid xml file. In noticed that if you browse to the crossdomain file on my site the browser opens the downl...