xml

Using xs:extension & xs:restriction together?

While writing an XML schema, I am attempting to do something like this <xs:complexType name="ValueWithUnits"> <xs:simpleContent> <xs:extension base="xs:double"> <xs:attribute name="uom" fixed="second"/> <xs:minInclusive="0"/> <xs:maxInclusive="10"/> </xs:extension> </xs:simpleC...

Making Loop in xPath() : Call to a member function xpath() on a non-object

I want to making loop with xpath() with this function: function rs(){ $rs = array(); $cities = array("city1", "city2", "city3", "city4", "city5", "city6", "city7", "city8"); foreach ($cities as $value) { $rs[] = $xmls->xpath("area[city= '$value']"); } return $rs; } $rs = rs(); Edit: function meteor(){ $request_url = "htt...

(FInite State Machine) - Implementing a XML schema validator in javascript

Hello, I have been working on a project for a month or so now to develop a XML validator (XSD) in javascript. I have gotten really close but keep running into problems. The only thing I have working well is normalizing schema structures into FSA that I store in the DOM. I have tried several methods to validate my xml structures agains...

How can I get PHP simplexml to save < as itself instead of &lt;

Basically I have a script that updates an xml document in various places... However, I need the text to be in CDATA... So I attempted this: $PrintQuestion->content->multichoice->feedback->hint->Passage->Paragraph->addChild('TextFragment', '<![CDATA[' . $value[0] . ']]>'); Unfortunately when I save the XML back to file,...

XML attributes to Array

Hello Everyone, I need to create a javascript array or object from an XML file that is structured as follows: <ITEMS> <TXT id="8" typ="1" pid="7" x="708" y="216" fcol="6777213" txt="sometext" hcmd="0" click="1"/> <TXT id="9" typ="1" pid="2" x="708" y="144" fcol="1231341" txt="some other text" hcmd="0" click="0"/> <GRAF id=...

Overriding code behind layout changes by loading XAML file

I have a WPF app in which my client wants to be able to write a custom xml file to change the default layout set by an existing XAML file. What I am trying to do is fall back to the XAML layout if there are errors in the xml file I am parsing. I have the code behind done for parsing the xml file and changing the default layout but I'm tr...

How to capitalize a the first letter of text in a TextView in an Android Application

I'm not referring to textInput, either. I mean that once you have static text in a TextView (populated from a Database call to user inputted data (that may not be Capitalized)), how can I make sure they are capitalized? Thanks! ...

Implementing nested menus from an xml file using on iphone using multiple delegates--request complete sample code

My problem is that I want to parse an xml file into a hierarchical menu in a series of drilldown tableviews on the iphone. The multiple delegates sample is hard for me to follow as it is a snippet and not a full fleshed out example. Pointers and full-fledged complete samples would be appreciated: I find that this is going to be hard to...

Use StAX parse RPC style soap response

Dear all, I have a soap response which is RPC style, so it has 'multiref's. The response was passed to me as a String. Can I use StAX parser to parse it? Can StaX resolve mutirefs automatically? Thanks, Sarah ...

Firefox and remote XSL stylesheets

I’m trying to load local XML files with a remote XSL stylesheet. IE seems to handle this just fine but not firefox. Is there a fix for this? ...

XML to PHP Array?

I am trying to edit an open source PHP wrapper to export an XML. Original: $new_invoice = array( array( "Type"=>"ACCREC", "Contact" => array( "ContactID" => "[contact id]" ), "Date" => "2010-04-08", "DueDate" => "2010-04-30", "Status" => "SUBMITTED", "LineAmountTyp...

replace selected escaped characters from the xml data

Hi All, I am very new to XML data processing, please help me building the XSLT code for replacing the selected escaped characters, Replace &gt; with > &lt; with < Thanks in advance. ...

Empty XML split out default XML

I have a XML passing to the XSL which gives the standard output. There is chance that i will get the XML as empty some times based on some cases. Is there any way if we have empty XML and get the standard or default out put in XSL ? ...

Style to xml means exact what?

Hi, I am new for the xml. I just want to know why xml needs styles. is this style means css ? and where it should impact ? ...

C# Write/Read GridDataView to XML ?

Hello, I created a DataGridView and I Configured it! how I can save all what the user input in XML file (settings.xml)? so next time the user run the program it will read all the data and view it in the GridDataView the data will not be that much, it is just some kind of settings! I found allot of tutorials online, but they either doe...

Escaping quotations for jQuery XML request

Simple question really, I am relatively new to both jQuery and XML. I just want to pull an email address into a link, but unsure how I am escaping the quotations. <a href="mailto:'+email+'">Email me</a> The +email+ is being taken from an XML file with code like this: <email>[email protected]</email> so I want the HTML to look like: <a...

Best way for automatic databinding between database and user interface in java swing app?

Hi, I'm currently facing a need of creating user frontend application to database with dozens of tables and thousands of fields. It should be java swing application, and I'm trying to find as most automated solution as possible. Ideally to completely avoid manual creation of DAO layer, beans definition and GUI creation. Currently we ...

How can i retrieve multiple rows from below XML data

<LOV> <_3081><![CDATA[136]]></_3081> <_3082><![CDATA[ Test Patient7 Test Patient7 - Individual Group]]></_3082> <_3083><![CDATA[Individual Group]]></_3083> <_3084><![CDATA[05/08/2010]]></_3084> <_3085><![CDATA[05/08/2010]]></_3085> <_3081><![CDATA[137]]></_3081> <_3082><![CDATA[Demo Mcn]]></_3082> <_3083><![CDATA[MCN Group]]></_3083> <_...

XML schema pattern for validating a logical expression

I am writing a schema to validate an xml document that can contain an attribute that is a logical expression. i.e. test="@a empty and @b empty and @c is keyword" (@x are "reference ids" that refer to elements in the schema that are being tested). I'm using patterns for this and have several that work. <!-- @refid is | is not keyword --...

Delete from xml according to attribute

hi every one. My xml file is named cgal.xml <?xml version="1.0"?> <item> <name><![CDATA[<img src="event_pic/pic1.jpg" />CALENDAR]]></name> <description title="NAM ELIT AGNA, ENDRERIT SIT AMET, TINCIDUNT AC." day="13" month="8" year="2010" id="15"><![CDATA[<img src="events/preview/13p1.jpg" /><font size="8" color="#6c6e74">In Gladiat...