xml

Soap xml for Paypal API SetMobileCheckout (rolling my own objective-c request)

I have the generic structure here: <?xml version=”1.0” encoding=”UTF-8”?> <SOAP-ENV:Envelope xmlns:xsi= ” http://www.w3.org/2001/XMLSchema-instance” xmlns:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” S...

convert html characters back to text in Flash - AS3

I need to generate an editable xml file to supply content to a flash website. I am generating my file with a html form, and htmlspecialchars e.g.: $currentItem = htmlspecialchars(stripslashes($currentItem)); This is to prevent xml entries which would produce the error "XML Parsing Error: not well-formed", such as <entry title=...

What php function can display formated XHTML from a XML file?

Ive been trying to display formatted content blocks from a xml file with no luck. Ive been using simplexml_load_file and other varients which Im now seeing cannot deal with the xhtml tags within the called tag ... eg. //php contents <?php $xml=simplexml_load_file("file.xml"); echo ($xml->entry); ?> //xml contents <entry> <p>This...

XML Schema for class containing a DataTable

I have one class which has field of type DataTable. I want to write XSD for this class. My problem is the datable structure is not fixed. The columns are added dynamically. How to write XSD for such a class? Once the XSD is defined, I want to validate the class serialized to XML against the XSD. ...

To fetch the attributes from the NodeList of XmlDocument?

Hi Everyone, I have part of XmlDocument Example.xml as given below: <rapaine dotoc="palin" domap="rattmin"> <derif meet="local" /> <derif meet="intro" /> . . . </rapaine> Here i am creating a Nodelist and fetching the element raplin to get its attributes. Now i want to make sure that whether the attributes 'dotoc' and 'domap' a...

Errors in Flex 3 XML implementation? Rewriting xml:lang

So I'm working on a quick utility to allow simple editing for TMX files. TMX is basically an XML-based standard for storing multilingual translations. Anyhoo, I'm importing TMX into an Adobe AIR app via a File reference, then grabbing the file stream, slapping the UTF-8 characters into a string, and then that string into an XML object. T...

AttributeError: xmlNode instance has no attribute 'isCountNode'

I'm using libxml2 in a Python app I'm writing, and am trying to run some test code to parse an XML file. The program downloads an XML file from the internet and parses it. However, I have run into a problem. With the following code: xmldoc = libxml2.parseDoc(gfile_content) droot = xmldoc.children # Get document root dchild = d...

Formatting element/attribute values with XML Serialization

I have a class that represents credit card details. To represent valid from and expiration months and years I am using four properties of type int: public int ValidFromMonth { get; set; } public int ValidFromYear { get; set; } public int ExpiresEndMonth { get; set; } public int ExpiresEndYear { get; set; } I am XML Serializing this c...

Best LINQ-to-XML query to select nodes based on properties of descendant nodes?

I have the following XML document: <?xml version="1.0" encoding="UTF-8"?> <FamilyTree> <Parent name="Ken"> <Child name="Lorna"> <Grandchild name="Andrew"/> <Grandchild name="Brian"/> </Child> <Child name="Mike"> <Grandchild name="Ann"/> <Grandchild name="Beth"/> </Child> </Parent> <Parent na...

XML validation with Schematron/XSD in C#

I've been looking around for at a way to make some more advanced business rule validation of XML documents. So far Schematron seems to be able to do, what I need. I've been looking around, and the few libraries I've found was very old and seemingly not supported any longer. Was Schematron only "hot" in 2002? Are there any libraries th...

how can i store rich text formatting in XML that pulls out to my page formatted

I am storing user inputs through a form with wiki style formatting (text for bold, _text for underline, etc) in my database. I was planning to use the db functions & some page code to store all of the info out to XML with the proper html formatting for each rich text field included. From there the XML gets parsed with an XSL stylesheet. ...

Javascript XML parsing or alternative

I'm building a Javascript preview function for a blog back-end (much like the one used on this website), and I'd like to be able to parse some custom tags that normally get parsed by PHP. I am wondering if it's possible to use the JS XML parser to parse content from a textarea that would look like: <img=1> Use for <url=http://apwit.com...

How to use TinyXml to parse for a specific element

I would like to parse a group of elements out of a TinyXml output. Essentially, I need to pick out any port element's "portid" attribute of the port has a state of "open" (shown below for port 23). What's the best way to do this? Here's the (simplified) listing for the output from TinyXml: <?xml version="1.0" ?> <?xml ?> <nmaprun> ...

JAXB Types problem

I have an xsd that looks like this (snippet): <xs:complexType name="IDType"> <xs:choice minOccurs="1" maxOccurs="2"> <xs:element name="FileID" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="IDNumber1" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="Number" minOccurs="0" maxOccurs="1" ty...

Asp.net, Xml error

hi everyone i am using asp.net and xml to create a page but it gives me an error System.Web.HttpException: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'para'. **AdminWelcomeMsg.aspx** <%@ Page Language="C#" MasterPageFile="ContentMasterPage.master" Debug="true"%> <%@ Import Namespace="System.Xml"%>...

What is the simplest/clearest XSD for this XML?

What is the simplest/clearest style of XSD for this kind of XML? (it's from this answer) <object name="contact"> <object name="home"> <object name="tel"> <string name="area" value="910"/> <string name="num" value="1234 5678"/> </object> </object> <object name="work"> <object name="tel"> <string nam...

How to create and use a XML document object properly considering browser compatibility?

Now I'm working on a web project. I need to create a XML document object using a given string buffer in JavaScript. I've successfully made it run smoothly on IE, but apparently I need to do some more work to improve its compatibility. To help you understand my poor English, here is a tiny example describing what I want to express (Note,...

Trying to parse XML tree with Linq to XML (C#)

Hi, I would like to reflect the XML tree in my object structure, but I am quite a beginner in LINQ to XML I have an XML with following structure: <questions> <question id="q1"> <number>1</number> <text>some text11</text> <answers> <answer> <v>some text11</v> </answer> <answer> <v>some text11</v> </a...

XML for configuration files, why?

Why do so many projects use XML as a configuration file language? ...

Auto comment all public members in a file

I have turned on warnings as errors and now i need to XML comment all of my public methods. just to get my program compiling, i just want to put placeholders for now. Is there anyway to automatically add XML comments to all of the public members in a class or a file. I see ghost doc which gives you good autogenerated XML comments but...