xml

Popup menu comes out in left bottom

爱⌒轻易说出口 提交于 2021-02-11 13:10:49
问题 I am trying to implement popup menu in my fragment but the result is far beyond my desire. I have a button on the action bar and one of these buttons call the popup menu and no problem till here. It successfully calls and I can see the popup menu. Here is how I do that. In fragment class @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.x) { } else showPopup(view /* or getView() */); return super.onOptionsItemSelected(item); } public void showPopup

How to fix ValueError: Field `active` does not exist in odoo

瘦欲@ 提交于 2021-02-11 13:07:45
问题 I have a view which inherits from view employee form, with fields from a model I created, but whenever I try to upgrade the module it shows me the ValueError: Field active does not exist error. Here is the view from which I inherited the employee form. <record model="ir.ui.view" id="training_log_employee_form_inherit"> <field name="name">training.log.employee.form.inherit</field> <field name="model">training.log.emp</field> <field name="inherit_id" ref="hr.view_employee_form"/> <field name=

How do I extract a value from an XML column in SQL Server

随声附和 提交于 2021-02-11 12:48:59
问题 I have a column SCORERESULTS in table CSE_ARCHIVEDCREDITSCORE. Score results is an XML column. <ScoringEngine> <Profile id="Navigation" version="1" num="4" uniqueId="8bcf8a8b9efc4e5dad1d87510cfe6a64"> . . . <Tool id="Payment To Income Ratio" version="1" old_id="Pmt_To_Income"> <Rule id="PaymentIncomeRatio" version="1" old_id="PTI"> <Row uniqueId="0fb11598c4224e4c97cf2afcc4e34b54" order="6" id="0"> <Column order="1" op="RNG2" start="0.18" end="0.2" title="Payment To Income Ratio">0.190325139<

Xpath to select elements that has specific child [duplicate]

孤街醉人 提交于 2021-02-11 12:44:49
问题 This question already has answers here : XPath - Get node with no child of specific type (5 answers) Closed 6 years ago . <item id=1> <name>item1</name> <price>30</price> </item> <item id=2> <name>item2</name> </item> I need an xpath to select only items that DO NOT have price for .net. 回答1: For your original question: item[price] will give you all item elements that have a price element child. This includes an empty <price/> so if you want to avoid matching <item> <name>item3</name> <price><

Distinguish between odd and even page in xsl

≡放荡痞女 提交于 2021-02-11 12:34:57
问题 I have some table in my document and I want different margins for odd and even pages, so how can I distinguish a page is odd/even using when condition in xsl fo. 回答1: You want: Separate fo:simple-page-master for the odd and even pages An fo:layout-master-set that selects the correct page master for odd and even pages. E.g.: <fo:page-sequence-master master-name="PageMaster"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="OddPage" odd-or-even=

Distinguish between odd and even page in xsl

雨燕双飞 提交于 2021-02-11 12:34:04
问题 I have some table in my document and I want different margins for odd and even pages, so how can I distinguish a page is odd/even using when condition in xsl fo. 回答1: You want: Separate fo:simple-page-master for the odd and even pages An fo:layout-master-set that selects the correct page master for odd and even pages. E.g.: <fo:page-sequence-master master-name="PageMaster"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="OddPage" odd-or-even=

Getting XML to feed into SQL Server table

安稳与你 提交于 2021-02-11 12:32:16
问题 I am trying to get a (for right now) simple XML to feed into a SQL Server table. The XML is: <?xml version="1.0" encoding="utf-8"?> <ArrayOfSafeEODBalance xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SafeEODBalance> <Lane>1</Lane> <PouchId>06292019053041001</PouchId> <BusinessDay>6/29/2019</BusinessDay> <BusinessStartingTime>6/29/2019 5:36:58 AM</BusinessStartingTime> <BusinessEndingTime>6/30/2019 12:15:55 AM</BusinessEndingTime>

nested looping within Xquery results in a mismatch? and idioms

北城以北 提交于 2021-02-11 12:29:38
问题 I'm playing with the bookstore XML from w3schools: <bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt

How to generate xml file with an existing dtd for sample of data using Java

旧城冷巷雨未停 提交于 2021-02-11 12:29:36
问题 I have some data stored in : HashMap<Position, Double> listOfPoints = new HashMap<>(); Where key contains pair (x,y). I have defined also my dtd file called generated.dtd which contains my structure : <!ELEMENT table (point*,id,position,x,y,value)> <!ELEMENT point (id,position,value)> <!ELEMENT id (ID)> <!ELEMENT position (x,y)> <!ELEMENT value (#PCDATA)> <!ELEMENT x (#PCDATA)> <!ELEMENT y (#PCDATA)> Using that file and sample of data stored in listOfPoints , I would like to generate an xml

Unable to get an element via query on attribute(containing hyphens) value using an XPATH

旧巷老猫 提交于 2021-02-11 12:23:06
问题 I'm facing a very weird scenario in getting an element having an attribute using an XPATH. The problem is that if the attribute contains more than one Hyphens in it then Selenium is unable to find that element. I am using Python and Selenium 2.52.0 Example that works fine. <span data-one="containingOnlyOneHyphen"> </span> XPATH = '//*[@data-one="containingOnlyOneHyphen"]' (Works Completely Fine) Example that doesn't work. <span data-one-two="containingTwoHyphen"> </span> XPATH = '//*[@data