xml

AppendChild and Specified method is not supported exception .

Below code gives this error message "Specified method is not supported". But here is sample which is same with mine. FileInfo file = new FileInfo("../../file.xml"); XDocument xfile = XDocument.Load(file.FullName); XPathNavigator nav = xfile.CreateNavigator(); nav.AppendChild("<pages>100</pages>"); ...

Pagination of text from xml file onto html page.

O.K. so I'm developing a website to feature my fiction writings. I'm putting all of my documents into XML files, pulling and parsing them from the server with PHP and displaying them on the page. You can visit the page here for an example. As implied from the background image, What I would like to do is take the text and split it int...

Modify a single XML attribute in C#

I've got it writing the XML doc fine, and it will look something like this <Team> <Character Name="Bob" Class="Mage"/> <Character Name="Mike" Class="Knight"/> </Team> I'm trying to find a way to access "Class" attribute of a single character and modify it. So far, i've got it to the point where I can pinpoint a specific character,...

XML Parsing in Android [Java]

The API I need to work with does not support xpath, which is a bit of a headache! :-( lol The xml I want to parse is as a String. My questions: Is there a Java equivalent of "simplexml_load_string", where it makes the string into an xml document for parsing? Which is better for parsing, SAX or DOM? I need to get a couple of values o...

validate xml file and fix errors immediately

I am writing a program that reads and validates a XML file. It should correct the XML file and fix immediately the error if a XmlSchemaValidationException is thrown. I am doing it with XmlReader. What kind of procedure should I apply? ...

Use Dynamic or Reflection.emit

I'm new to C# and would like to ask for some direction on solving the following problem. I've got a xml file used as a template (without knowing its content in advance). something like: <Object> <Property name="ID"> <Value weight="40">10000</Value> <Value weight="60">20000</Value> </Property> <Property name="Name"> <V...

Select XML nodes by attribute in AS3

Trying to parse some XML (over which I have no control!) In C# I would do something like: XmlNodeList xnList = xml.SelectNodes("/Names/Name[@type='M']"); Can this be done in AS3? ...

confusing about simpleXML

I have a xml file: <kemo> <cities> <area>area1</area > <city>city1</city> <status>Lipsum1</status> </cities> <cities> <area>area1</area > <city>city2</city> <status>Lipsum2</status> </cities> <cities> <area >area2</area > <city>city3</city> <status>Lipsum3</status> </cities> <cities> <area >a...

XElement value in C#

How to get a value of XElement without getting child elements? An example: <?xml version="1.0" ?> <someNode> someValue <child>1</child> <child>2</child> </someNode> If i use XElement.Value for <someNode> I get "somevalue<child>1</child><child>2<child>" string but I want to get only "somevalue" without "<child>1</child><ch...

SQL Query / Xml

I'm trying to query a table which has a column that contains straight xml data. Within the query I'm querying columns that hold straight data (int, vchar etc) but I'm also querying the xml column. In the xml column i want to grab a value within the xml and return null if it doesn't exist. I have the following query that almost works b...

Strange behavior when loading page using XMLHttpRequest

I have a script like this: var xml_http_request = new XMLHttpRequest(); xml_http_request.addEventListener('readystatechange', PageReady, false); xml_http_request.overrideMimeType("text/xml"); xml_http_request.open('GET', "index.xml", true); xml_http_request.send(null); function PageReady() { if(this.readyState != 4) return;...

Write xml cofiguration file and C# parser for ado.net query .

I wont to write a xml configuration file that containg query to the same db, only query to view. The "query node" must have the filters parameter. How i can write this xml file and the C# Parser , and QueryBuilder classes. I wont some thinl like this: <Query Name="Application Approval by Month" src="APPLICATION_APPROVAL_COUNT_BY_MONT...

Plotting Data from XML that has Timestamps on the X-axis.

I got help parsing the following XML file on this site: <?xml version = "1.0"?> <Company > <shareprice> <timeStamp> 12:00:00.01</timeStamp> <Price> 25.02</Price> </shareprice> <shareprice> <timeStamp> 12:00:00.02</timeStamp> <Price> 15</Price> </shareprice> <shareprice> <timeStamp> 12:00:00.0...

String[] type property mapping on nhibernate...is possible?

Is possible mapping vector types on nhibernate? I have a property like this... string[] myDesc and I would map every vector value to a specific column of my table...for example: myDesc[0] --> myDbColumn01 myDesc[1] --> myDbColumn02 myDesc[2] --> myDbColumn03 ... Is there any way to do it? ...

Find an element in xml by its inner text

I am trying to search an xml element from the root element of the file on the basis of inner text. i have tried this but didnt work: rootElRecDocXml.SelectSingleNode("/ArrayOfRecentFiles[name='"+mFilePath+"']"); I know the old school way to traverse all file elemen by element but i dont want to do that. Please note that: my root elem...

Android adding footer to ListView addFooterView() ?

I have a ListView activity that needs a footer to the list of items so that you can click it and it would load more items into the list. The list is backed my an SimpleAdapter backed by a map of strings and before the adapter is set i do this inorder to add the footer: mInflater.inflate(R.layout.list_load_more_row, null); TextView foot...

XML document for UPS Freight Shipping

I was wondering if anyone knew of where I could find an example XML document so that I could get get a FREIGHT LTL shipping quote from the UPS API. My XML mojo is seriously deficient, and all UPS has provided me is an XSD document. My client is really hoping that I can get this done sooner rather than later, and I need to send this as ...

getting a single xml node - android dev

Hi guys I'm newbie to android development and I need some help... I want to make an app that will use data from an xml database and there are two points where I need help cause I find java with xml too complicate... eg. <items> <1><name>box</name><price>2.00</price></1> <2><name>pencil</name><price>1.00</price></1> </items> 1)get a ...

How to read nested configuration element from the web.config?

Hi, I need to read configuration elements from the web.config. Let this be my web.config. <family> <parents> <child name="Hello"/> <child name="World"/> </parents> <parents> <child name="Hello1"/> <child name="World2"/> </parents> </family> So I have something like this, I need to read this into a collection. H...

Transform an integer value to a repeated character

When my XSL stylesheets encounters this node: <node attribute="3"/> ...it should transform it into this node: <node attribute="***"/> My template matches the attribute and recreates it, but I don't know how to set the value to: the character '*' repeated as many times as the value of the original attribute. <xsl:template match="no...