Output HTML not being display with XML/XSL documents - html

I am having issues with the HTML output. In fact, I am not getting any output when I merge these two files. I tried different online tools and various XSL tutorials. It is probably something that I overlook. Any help will be highly appreciated.
XML file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<colleges>
<college id="0">
<school>College of Education</school>
<mission>Our College is committed to provide the best quality education to students in a multicultural and intercultural setting. We deliver undergraduate and graduate programs based on proven best practice, knowledge acquisition, reflective inquiry, critical thinking and respect for the culturally and linguistically diverse learner. We also work to continuously develop a dynamic local, national, and international dimension that promotes innovation and contributes to scientific, educational, economic and social change. The innovative programs and courses at our College serve some 3,800 graduate and undergraduate students every semester. At the undergraduate level, we offer 30 undergraduate programs of which 22 are leading to teacher certification from elementary to post-secondary. In addition, we have non-teacher programs which lead to the B.S. in kinesiology and exercise science. At the graduate level, we offer 15 master's specializations in bilingual education, counseling and guidance, curriculum and instruction, educational leadership, educational technology, English as a second language, health and human performance, and special education. Doctoral candidates in curriculum and instruction can specialize in bilingual studies, educational leadership, educational technology, and higher education teaching.​​​​​​​​​​</mission>
<department>Educational Psychology and Leadership</department>
<department>Health and Human Performance</department>
<department>Language, Literacy and Intercultural Studies</department>
<department>Teaching, Learning and Innovation</department>
</college>
<college id="1">
<school>College of Nursing</school>
<mission>Our college is committed to provide high quality nursing education for students and to provide opportunities for life-long learning for nurses. The College of Nursing also recognizes the diversity and uniqueness of the community that it serves, and is committed to the enhancement of the quality of health care through excellence in teaching, research, service, continuing education and the promotion of evidence-based practice.​​​​​​​​​</mission>
<department>Nursing</department>
</college>
<college id="2">
<school>School of Business</school>
<mission>The School of Business is committed to educating and preparing students so that they may succeed in their academic career and professional endeavors. UTB/TSC provides a learning environment developed on an innovative curriculum, and offers opportunities for students to become involved in meaningful projects and internships that allow them to acquire experience while contributing to the reinforcement and expansion of their academic knowledge. The programs offered at the School of Business include an Associate of Arts in Business Administration, a Bachelor of Business Administration with different options in specialization and an M.B.A. These programs have been carefully designed with the purpose of helping students gain a well-rounded understanding of the various facets of the business world. The material is reinforced through research assignments, which serve to clarify relevant dimensions and prepare students to address key decisions in innovative ways. Furthermore, academic-level standards have been set high in order to offer students the opportunity to develop integrative, critical thinking, leadership and communication skills and to acquire an ample base of technical skills required for their profession.</mission>
<department>Accounting and Management Information Systems</department>
<department>Applied Business Technology</department>
<department>Finance and Economics</department>
<department>Management and Marketing</department>
</college>
<college id="3">
<school>College of Liberal Arts</school>
<mission>The College of Liberal Arts is the largest and most diverse college of the University. It is comprised of ten academic departments — Behavioral Sciences, Criminal Justice, English, Communication, Government, History, Modern Languages, Music, and Visual Arts — and offers nearly 40 undergraduate programs of study and over one dozen graduate degrees. The 130 dedicated faculty members of the College of Liberal Arts comprise a vibrant community of teachers and scholars who share with their students their passion and knowledge of the arts, literature and history, and well as human and behavioral cultures. The College also supports specialized and innovative programs in Architecture, Forensic Investigation as well as a Spanish Translation and Interpreting Studies. Additionally the College of Liberal Arts provides cultural access and educational opportunities for the people of the Rio Grande Valley through its sponsorship and support of the Patron of the Arts Series, the Letras en el Estuario Binational Conference in Hispanic Letters, the creative writing journal, El Novostanderino, the Sabal Palms Writing Project, the South Texas Victim Symposium, the Texas Center for Border and Transnational Studies, and many other activities.</mission>
<department>Behavioral Sciences</department>
<department>Communications</department>
<department>Criminal Justice</department>
<department>English</department>
<department>Government</department>
<department>History</department>
<department>Modern Languages</department>
<department>Music</department>
<department>Visual Arts</department>
</college>
<college id="4">
<school>College of Science, Math and Technology</school>
<mission>The College of Science at The University of Texas at Brownsville combines a strong commitment to high undergraduate education with the very best of a top-tier research university. Our focus is undergraduate and graduate education, and we provide opportunities to achieve your educational goals, whatever they are, from a bachelor's degree up to cooperative Ph.D. degree. Our strong and diverse faculty — many of whom are leading experts in the fields of science, medicine, mathematics, computer science, engineering and technology — will prepare you for the career of your choice.</mission>
<department>Biological Sciences</department>
<department>Chemistry and Environmental Sciences</department>
<department>Computer Information Sciences</department>
<department>Engineering Department</department>
<department>Mathematics</department>
<department>Physics and Astronomy</department>
</college>
<college id="5">
<school>College of Biomedical Sciences and Health Professions</school>
<mission>The department of Biomedicine is currently under development in conjunction with a UT System initiative in Medical Education.</mission>
<department>Allied Health</department>
</college>
</colleges>
XSL file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Colleges</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">College Name</th>
<th align="left">College Mission</th>
<th align="left">Department</th>
</tr>
<xsl:for-each select="college">
<tr>
<td><xsl:value-of select="school" /></td>
<td><xsl:value-of select="mission" /></td>
<td><xsl:value-of select="department" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Try changing:
<xsl:for-each select="college">
to:
<xsl:for-each select="colleges/college">
--
Note:
In your input, each college has several departments - you only get the value of the first one of these when you do:
<td><xsl:value-of select="department" /></td>

Related

target and random attacks in dark networks: what's new? [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 days ago.
Improve this question
Dear dark network analysts, covert network lovers, sociologists with interests in secret societies, and practitioners of network analysis in police and in journalism,
This week, I am modeling nodal attacks on a well-known Italian mafia network in the United States, I received as a gift from a research team which managed to publish recently with Social Networks. Typically, in a node attacks paper, network scientists sequentially remove some element from the network and monitor a number of graph connectivity measures (e.g., Albert, Jeong & Barabási 2000). We have seen from the network literature the following attack strategies on covert networks:
target attacks, or attacks on most central actors (e.g., Xu and Chen 2008)
random attacks (e.g., Xu and Chen 2008)
bridge and broker attacks (e.g., Xu and Chen 2008)
hubs removal
What other original structural attacks on criminal networks could you think of? I am particularly interested in implementing node removal strategies which are being used in the police.
What innovations in nodal attacks could I immediately propose? We could attempt to remove entire micro structures from the dark network in some order and see what happens with its connectivity. Federico Varese and Diego Gambetta wrote extensively on the importance of the triad in criminal organizations (e.g., Gambetta 2000; Varese 2000) and the triad as a business (e.g., Chu 2000). Mark Lauchs wrote two papers on blowing the whistle in chains of corrupt transactions and how these chains sequentially fail (e.g., Lauchs et al. 2011, 2012). Mark Granovetter briefly sketched a few sociological remarks on market corruption and network corruption (Granovetter 2004). I guess his network argument could be applied to the removal of entire k-cores, n-clubs or n-cliques of corruption monopolies or oligopolies in the network market of organized crime.
triads
chains and certain paths
cliques
small ego networks
partial branches and hierarchies
k-cores
n-clubs
Furthermore, I have also been interested in monitoring murder in covert networks applying dreadful historically documented techniques of personnel removal utilized in mafias, gangs, terrorist networks, crime rings, and military organizations, such as:
astrological murder
alphabetical murder
black lists
kinship bloodshed violence, e.g., taxing with first sons in family
extinction of entire bloodlines, e.g., the witches in The Vampire Diaries with Nina Dobrev
eradication of entire crime families
Clearly these aren’t structural attacks, yet some of their motivations may hide network motives. Is there a movie called, The network murder? Regrettably, I only know Andrew Papachristos’ “Murder by structure,” (2009) a paper which was originally coined to me by the American sociologist Peter Bearman. Obviously, an original source for modeling network attacks could be chapter “Death” from Federico Varese’s Mafia Life (2018). The books features a number of original feuds and interclan wars in the mafia, which aren't necessarily network-based, yet they are tremendously smart economic-wise.
For the lazy math geeks out there who don't have time to read many books or review the voluminous Italian literature on the topic, I recommend going to the Italian mafia movies during the weekends.
References
Albert, R., Jeong, H., & Barabási, A. L. (2000). Error and attack tolerance of complex networks. Nature, 406(6794), 378-382.
Chu, Y. K. (2002). The triads as business. Routledge.
Gambetta, D. (2002). “Corruption: An analytical map.”
Granovetter, M. (2004). “The Social Construction of Corruption.” Department of Sociology.
Lauchs, M., Keast, R., & Chamberlain, D. (2012). Resilience of a corrupt police network: the first and second jokes in Queensland. Crime, law and social change, 57, 195-207.
Lauchs, M., Keast, R., & Yousefpour, N. (2011). Corrupt police networks: uncovering hidden relationship patterns, functions and roles. Policing & society, 21(1), 110-127.
Papachristos, A. V. (2009). Murder by structure: Dominance relations and the social structure of gang homicide. American journal of sociology, 115(1), 74-128.
Varese, F. (2000). “Pervasive corruption.” Economic crime in Russia, 99-111.
Varese, F. (2018). Mafia life: Love, death, and money at the heart of organized crime. Oxford University Press.
Xu, J., & Chen, H. (2008). The topology of dark networks. Communications of the ACM, 51(10), 58-65.
(google scholar, ameliorate the referencing whenever possible)
Currently, I am experimenting with removing entire crime families, blood lines and smaller network structures. This is also a brilliant way to improve the brainwaver package in R, which at present is somewhat limited (for my needs at least).

Python json.loads returning JSONDecodeError Expecting ',' delimiter

I am trying to parse a JSON raw string using json.loads but its throwing following error
JSONDecodeError at /octopus/entries/53/test_sample_job/
Expecting ',' delimiter: line 3 column 27 (char 48)
My json string data is as follows and I am getting error when i did json.loads(data)
data = {
"name": "Shea",
"content": "<p style="text-align:left">Job Description</p><p style="text-align:inherit"></p>Have you heard about phenom? phenom is an innovative, global healthcare leader committed to improving health and well-being in 140 countries around the world. We continue to focus our research on conditions that affect millions of people around the world - diseases like Alzheimer's, Diabetes and Cancer - while further expanding our strengths in areas such as vaccines and biologics. We aspire to be the best healthcare company in the world and are dedicated to providing leading innovations and solutions for tomorrow. phenom’s Global Human Health (GHH) Division abides by a “patient first, profits later” ideology. Results-driven and ambitious, this team of individuals represents a functional balance between meeting company objectives and the needs of people around the world. The division is comprised of sales and marketing professionals who are passionate about their role in bringing phenom's prescription medicines, vaccines, and other medical products to our customers worldwide. Who are we looking for? A strong Professional for the position of the Hospital Specialist in Oncology who is responsible for promoting oncology brands within given accounts. On this position you would need to understand customers’ needs and have strong business acumen. It is important YOU are being equipped with excellent medical knowledge where you can transfer key medical data into customer / patient benefits. Expected Qualification of YOURS: - University degree preferably life science - 3+ years of experience working in a customer-facing role - Strong knowledge of customer/business strategy - Understanding of local healthcare and reimbursement systems - English language preferred Key competencies: - Customer & Market Insights: Ability to develop a deep understanding of customer needs, behaviours and goals, as well as market dynamics, competitor analysis and trends to improve overall business outcomes. - Customer Engagement: Ability to identify and appropriately build and maintain long-term, sustainable relationships with customers, external stakeholders and key influencers through a variety of relationship-building approaches. - Strategic Business Management: Ability to set strategic plans, consider execution trade-offs and continuously adjust approaches to maximize business performance and increase sales. - Excellent medical Product knowledge – excellent evidence-basedmedicine data knowledge. Ability to transfer medical data into customer / patients benefits Skills Required: - Driving license B - Advance Medical knowledge of oncology therapy area preferably or demonstrate high learning agility and interest in evidence-based medicine data and ability to transfer them into customer / patients benefits Leadership behaviours: - Drive result - Focus on customer and patient - Demonstrate ethics and integrity - High learning agility YOUR primary activities include but are not limited to: Account Understanding and Analysis - Understanding decision-making processes within the account, patient flow - Identifying Account Stakeholders and understanding their perspectives on phenom, our competitors - Completing a competitor analysis for the account - Obtaining an in-depth understanding of the account’s unmet and evolving needs Account Plan Development - Identifying short and long-term business opportunities. - Defining objectives for the account - Developing a plan for the Account that contains the account needs and perspectives as well as considers competitive and business challenges - Determining how to appropriately leverage cross-functional internal resources to maximize potential - Defining account metrics and a tracking plan Account Plan Implementation and Tracking - Developing and maintaining long-term engagements with customers/stakeholders within the Accounts that are responsible for treatment of the respective patients (all relevant HCPs) as well as product purchasing (hospital management, pharmacists) - Conducting product and value-based negotiation <p style="text-align:inherit"></p><p style="text-align:left"><b>English Job Description:</b></p><p style="text-align:inherit"></p><p style="text-align:inherit"></p><p></p><p><b>Search Firm Representatives Please Read Carefully </b><br>phenom & Co., Inc., Kenilworth, NJ, USA, also known as phenom phenom & phenom Corp., Kenilworth, NJ, USA, does not accept unsolicited assistance from search firms for employment opportunities. All CVs / resumes submitted by search firms to any employee at our company without a valid written search agreement in place for this position will be deemed the sole property of our company. No fee will be paid in the event a candidate is hired by our company as a result of an agency referral where no pre-existing agreement is in place. Where agency agreements are in place, introductions are position specific. Please, no phone calls or emails. </p><p style="text-align:inherit"></p><p style="text-align:left"><b>Employee Status: </b></p>Regular<p style="text-align:inherit"></p><p style="text-align:left"><b>Relocation:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>VISA Sponsorship:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b><span>Travel Requirements:</span></b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Flexible Work Arrangements:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Shift:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Valid Driving License:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Hazardous Material(s):</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Number of Openings: </b></p>1",
"street_name": "Bartol",
"city": "Brentwood",
"country": "Slovenia",
"continent": "Europe"
}
I observed that the issue is happening in the content value where I am having HTML code that contains double quotes. I have tried various solutions like json.loads(repr(data)) and html.escape(json.loads(data)) but still my error is not getting resolved.
I even tried to replace all the double quotes with empty string but then it threw an error saying too many values to unpack
I wanted to try this solution but unable to figure out how to use r in this case as my string is stored in a variable data.
Please suggest a workaround for this inorder to parse this json.
You have double quotes within the quotes of the string for the content. Use a """ for the content to use a string literal.
Or add an escape character for every quote mark as \" within the content string.
data = {
"name": "Shea",
"content": """<p style="text-align:left">Job Description</p><p style="text-align:inherit"></p>Have you heard about phenom? phenom is an innovative, global healthcare leader committed to improving health and well-being in 140 countries around the world. We continue to focus our research on conditions that affect millions of people around the world - diseases like Alzheimer's, Diabetes and Cancer - while further expanding our strengths in areas such as vaccines and biologics. We aspire to be the best healthcare company in the world and are dedicated to providing leading innovations and solutions for tomorrow. phenom’s Global Human Health (GHH) Division abides by a “patient first, profits later” ideology. Results-driven and ambitious, this team of individuals represents a functional balance between meeting company objectives and the needs of people around the world. The division is comprised of sales and marketing professionals who are passionate about their role in bringing phenom's prescription medicines, vaccines, and other medical products to our customers worldwide. Who are we looking for? A strong Professional for the position of the Hospital Specialist in Oncology who is responsible for promoting oncology brands within given accounts. On this position you would need to understand customers’ needs and have strong business acumen. It is important YOU are being equipped with excellent medical knowledge where you can transfer key medical data into customer / patient benefits. Expected Qualification of YOURS: - University degree preferably life science - 3+ years of experience working in a customer-facing role - Strong knowledge of customer/business strategy - Understanding of local healthcare and reimbursement systems - English language preferred Key competencies: - Customer & Market Insights: Ability to develop a deep understanding of customer needs, behaviours and goals, as well as market dynamics, competitor analysis and trends to improve overall business outcomes. - Customer Engagement: Ability to identify and appropriately build and maintain long-term, sustainable relationships with customers, external stakeholders and key influencers through a variety of relationship-building approaches. - Strategic Business Management: Ability to set strategic plans, consider execution trade-offs and continuously adjust approaches to maximize business performance and increase sales. - Excellent medical Product knowledge – excellent evidence-basedmedicine data knowledge. Ability to transfer medical data into customer / patients benefits Skills Required: - Driving license B - Advance Medical knowledge of oncology therapy area preferably or demonstrate high learning agility and interest in evidence-based medicine data and ability to transfer them into customer / patients benefits Leadership behaviours: - Drive result - Focus on customer and patient - Demonstrate ethics and integrity - High learning agility YOUR primary activities include but are not limited to: Account Understanding and Analysis - Understanding decision-making processes within the account, patient flow - Identifying Account Stakeholders and understanding their perspectives on phenom, our competitors - Completing a competitor analysis for the account - Obtaining an in-depth understanding of the account’s unmet and evolving needs Account Plan Development - Identifying short and long-term business opportunities. - Defining objectives for the account - Developing a plan for the Account that contains the account needs and perspectives as well as considers competitive and business challenges - Determining how to appropriately leverage cross-functional internal resources to maximize potential - Defining account metrics and a tracking plan Account Plan Implementation and Tracking - Developing and maintaining long-term engagements with customers/stakeholders within the Accounts that are responsible for treatment of the respective patients (all relevant HCPs) as well as product purchasing (hospital management, pharmacists) - Conducting product and value-based negotiation <p style="text-align:inherit"></p><p style="text-align:left"><b>English Job Description:</b></p><p style="text-align:inherit"></p><p style="text-align:inherit"></p><p></p><p><b>Search Firm Representatives Please Read Carefully </b><br>phenom & Co., Inc., Kenilworth, NJ, USA, also known as phenom phenom & phenom Corp., Kenilworth, NJ, USA, does not accept unsolicited assistance from search firms for employment opportunities. All CVs / resumes submitted by search firms to any employee at our company without a valid written search agreement in place for this position will be deemed the sole property of our company. No fee will be paid in the event a candidate is hired by our company as a result of an agency referral where no pre-existing agreement is in place. Where agency agreements are in place, introductions are position specific. Please, no phone calls or emails. </p><p style="text-align:inherit"></p><p style="text-align:left"><b>Employee Status: </b></p>Regular<p style="text-align:inherit"></p><p style="text-align:left"><b>Relocation:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>VISA Sponsorship:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b><span>Travel Requirements:</span></b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Flexible Work Arrangements:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Shift:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Valid Driving License:</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Hazardous Material(s):</b></p><p style="text-align:inherit"></p><p style="text-align:left"><b>Number of Openings: </b></p>1""",
"street_name": "Bartol",
"city": "Brentwood",
"country": "Slovenia",
"continent": "Europe"
}

XCUI Test Turn Automated Test into Consistent Selector

func testExample() {
XCUIApplication()/*#START_MENU_TOKEN#*/.otherElements.matching(identifier: " Menu  Add 10 e-books for mastering DIY electronics with Arduino UK Information Commissioner's Office raids Cambridge Analytica's London office Your passports are full of tech Cambridge Analytica became a US powerhouse thanks Mercer's laundered money and a judas goat named John Bolton These modern-day 1920s' style swimsuits are for any body NASA's got a computer model for predicting landslides You can have a giant lollipop made of your face People who make their own mechanical watches Egypt’s Election Should Be a Lock. So Why Is President Sisi Worried? French Police Officer Wounded in Hostage Standoff Dies Polish Women Protest Proposed Abortion Ban (Again) At Swedish Preschool, Boys Learn to Dance and Girls Learn to Yell North and South Korea to Hold Preparatory Talks for Summit Meeting ‘The Whole World Should Be Concerned’: U.S. Allies React to Bolton’s Appointment Uber's autonomous vehicles require frequent human intervention A tour of the manipulative, creepy bullshit Facebook pulls to stop you deleting your account Trump Just Pushed the World Trade Organization Toward Irrelevance Misreading Trump: Ally Japan Is Spurned on Tariff Exemptions 150 Whales Beached in Australia, as Rescuers Fight to Save Them Responding to Trump, China Plans New Tariffs on U.S. Goods Spectre and Meltdown: CPU bugs put a scare in the air From Capistrano to Kubernetes: Lessons from PhraseApp's transition 9 code and framework trends to watch in 2018 6 reasons to co-locate your app and automation code 5 IT Ops management trends to watch in 2018 GDPR wakeup call: 3 ways dev teams can build in privacy like security 6 levels of AI-based testing: Have no fear, QA pros How to map your DevOps journey Best of TechBeacon 2017: Quality comes first The best agile and lean development conferences of 2018 Dropbox IPOs. Its Founders Are Now Billionaires Uber's Self-Driving Cars Were Struggling Before Arizona Crash British Scientists Develop Wearable MRI Scanner One Startup is Using Phone Calls and Other Inexpensive Means To Save TB Patients Britain's Plan To Build a 2,000 Foot Aircraft Carrier Almost Entirely From Ice New York Councilman Proposes Bill That Would Grant NYC Workers 'Right To Disconnect' Spotify Says 2 Million Users Hacked Apps To Suppress Ads On Its Free Service Apple To Unveil a Cheaper iPad Next Week At Its Educational Event Facebook Gets Hit With Four Lawsuits Over Cambridge Analytica Scandal School Pays To Get an Algorithm To Scan Students' Social Media For Threats and Suicide Risks Posts  Previous Next ").staticTexts["Menu"]/*[[".otherElements[\"RssList\"]",".otherElements[\"rss_list_populated\"]",".scrollViews.otherElements[\" Menu  Add 10 e-books for mastering DIY electronics with Arduino UK Information Commissioner's Office raids Cambridge Analytica's London office Your passports are full of tech Cambridge Analytica became a US powerhouse thanks Mercer's laundered money and a judas goat named John Bolton These modern-day 1920s' style swimsuits are for any body NASA's got a computer model for predicting landslides You can have a giant lollipop made of your face People who make their own mechanical watches Egypt’s Election Should Be a Lock. So Why Is President Sisi Worried? French Police Officer Wounded in Hostage Standoff Dies Polish Women Protest Proposed Abortion Ban (Again) At Swedish Preschool, Boys Learn to Dance and Girls Learn to Yell North and South Korea to Hold Preparatory Talks for Summit Meeting ‘The Whole World Should Be Concerned’: U.S. Allies React to Bolton’s Appointment Uber's autonomous vehicles require frequent human intervention A tour of the manipulative, creepy bullshit Facebook pulls to stop you deleting your account Trump Just Pushed the World Trade Organization Toward Irrelevance Misreading Trump: Ally Japan Is Spurned on Tariff Exemptions 150 Whales Beached in Australia, as Rescuers Fight to Save Them Responding to Trump, China Plans New Tariffs on U.S. Goods Spectre and Meltdown: CPU bugs put a scare in the air From Capistrano to Kubernetes: Lessons from PhraseApp's transition 9 code and framework trends to watch in 2018 6 reasons to co-locate your app and automation code 5 IT Ops management trends to watch in 2018 GDPR wakeup call: 3 ways dev teams can build in privacy like security 6 levels of AI-based testing: Have no fear, QA pros How to map your DevOps journey Best of TechBeacon 2017: Quality comes first The best agile and lean development conferences of 2018 Dropbox IPOs. Its Founders Are Now Billionaires Uber's Self-Driving Cars Were Struggling Before Arizona Crash British Scientists Develop Wearable MRI Scanner One Startup is Using Phone Calls and Other Inexpensive Means To Save TB Patients Britain's Plan To Build a 2,000 Foot Aircraft Carrier Almost Entirely From Ice New York Councilman Proposes Bill That Would Grant NYC Workers 'Right To Disconnect' Spotify Says 2 Million Users Hacked Apps To Suppress Ads On Its Free Service Apple To Unveil a Cheaper iPad Next Week At Its Educational Event Facebook Gets Hit With Four Lawsuits Over Cambridge Analytica Scandal School Pays To Get an Algorithm To Scan Students' Social Media For Threats and Suicide Risks Posts  Previous Next \"]",".otherElements.matching(identifier: \" Menu  Add\")",".otherElements[\"main_header\"]",".otherElements[\" Menu\"].staticTexts[\"Menu\"]",".staticTexts[\"Menu\"]",".otherElements.matching(identifier: \" Menu  Add 10 e-books for mastering DIY electronics with Arduino UK Information Commissioner's Office raids Cambridge Analytica's London office Your passports are full of tech Cambridge Analytica became a US powerhouse thanks Mercer's laundered money and a judas goat named John Bolton These modern-day 1920s' style swimsuits are for any body NASA's got a computer model for predicting landslides You can have a giant lollipop made of your face People who make their own mechanical watches Egypt’s Election Should Be a Lock. So Why Is President Sisi Worried? French Police Officer Wounded in Hostage Standoff Dies Polish Women Protest Proposed Abortion Ban (Again) At Swedish Preschool, Boys Learn to Dance and Girls Learn to Yell North and South Korea to Hold Preparatory Talks for Summit Meeting ‘The Whole World Should Be Concerned’: U.S. Allies React to Bolton’s Appointment Uber's autonomous vehicles require frequent human intervention A tour of the manipulative, creepy bullshit Facebook pulls to stop you deleting your account Trump Just Pushed the World Trade Organization Toward Irrelevance Misreading Trump: Ally Japan Is Spurned on Tariff Exemptions 150 Whales Beached in Australia, as Rescuers Fight to Save Them Responding to Trump, China Plans New Tariffs on U.S. Goods Spectre and Meltdown: CPU bugs put a scare in the air From Capistrano to Kubernetes: Lessons from PhraseApp's transition 9 code and framework trends to watch in 2018 6 reasons to co-locate your app and automation code 5 IT Ops management trends to watch in 2018 GDPR wakeup call: 3 ways dev teams can build in privacy like security 6 levels of AI-based testing: Have no fear, QA pros How to map your DevOps journey Best of TechBeacon 2017: Quality comes first The best agile and lean development conferences of 2018 Dropbox IPOs. Its Founders Are Now Billionaires Uber's Self-Driving Cars Were Struggling Before Arizona Crash British Scientists Develop Wearable MRI Scanner One Startup is Using Phone Calls and Other Inexpensive Means To Save TB Patients Britain's Plan To Build a 2,000 Foot Aircraft Carrier Almost Entirely From Ice New York Councilman Proposes Bill That Would Grant NYC Workers 'Right To Disconnect' Spotify Says 2 Million Users Hacked Apps To Suppress Ads On Its Free Service Apple To Unveil a Cheaper iPad Next Week At Its Educational Event Facebook Gets Hit With Four Lawsuits Over Cambridge Analytica Scandal School Pays To Get an Algorithm To Scan Students' Social Media For Threats and Suicide Risks Posts  Previous Next \")"],[[[-1,7,3],[-1,2,3],[-1,1,2],[-1,0,1]],[[-1,7,3],[-1,2,3],[-1,1,2]],[[-1,7,3],[-1,2,3]],[[-1,6],[-1,5],[-1,4,5],[-1,3,4]],[[-1,6],[-1,5],[-1,4,5]],[[-1,6],[-1,5]]],[0,0]]#END_MENU_TOKEN#*/.tap()
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
The identifier here contains text from various RSS feeds that change every time I run the test.
How do I:
Select by index from otherElements or some other criteria
await that element.
the answer was this:
func testClicksOnMenu() {
let app = XCUIApplication();
let containsMenu = NSPredicate(format: "label contains[c] %#", "Menu");
let other = app.otherElements.containing(containsMenu).staticTexts["Menu"];
let exists = other.waitForExistence(timeout: 10);
XCTAssertTrue(exists, "Expected Menu to Exist");
other.tap();
}
basically you just need a matcher for the otherElements it actually returns 11 elements that match name contains Menu but the there is only one accesibilityId for Menu for staticText. Tests also run fairly quick and stable.

Read the content of a DIV from an XML file

I need help with this project that I have to load the content of a <div> from an XML file and not from the HTML itself. And I don't know how I could realize that.
<?xml version="1.0" encoding="UTF-8"?>
<all> <!-- this is root -->
<dean>
<p>The Faculty of Computer Science seeks to prepare students for careers as computer specialists of the highest international standards, to enter careers in computer or software design, and for advanced study in computer science.The Faculty of Computer Science has accredited undergraduate degree in computer science, internet computing and software engineering disciplines. The degree was evaluated and accredited by the Egyptian Supreme Council of Higher Education in 1998. Furthermore, Computer Science students can successfully join other universities in Europe and North America, to complete their undergraduate and postgraduate studies. Our programme is designed to provide students with a combination of fundamental knowledge and lifelong learning skills that prepare graduates for a successful career in the computer science, software engineering and internet computing fields. At the same time, our curriculum provides students with the necessary practical skills to enable them to be productive from their first day on the job.</p>
<image>image.jpg</image>
</dean>
<dean>
<p> Graduates of the Faculty of Computer Science at MSA are specialized in several areas within the computing professions. Their expertise and skills are due to unlimited facilities, an up to date curriculum and a group of prominent faculty members.</p>
</dean>
<dean>
<p> Being in touch with international sites, through the Internet and computer usage, is an integrated part of the Computer Science program. In addition, students receive extra attention as they are divided into small groups. Long contact hours and close supervision give students the chance to make the most of their faculty experience. Students are thus, provided with capabilities that prepare them for practical fields in computer science at an international professional level. The Faculty maintains close relationships with computer companies, which provide support to our programme. We aim to be a centre of excellence in computer science for our students, faculty, and local industry.</p>
</dean>
<dean>
<p>Graduates of the Faculty of Computer Science have found satisfying careers in leading computer companies. We welcome all students interested in hard and excellent education in Computer Science, of the highest international standards in a unique pleasant educational environment. We are dedicated in providing a high quality education for all our students.</p>
</dean>
<dean>
<p>Your future awaits you here at MSA,</p>
</dean> <!-- fixed and added end tag in EDIT for XML well-formed-ness -->
<dean>
<p>Prof. Dr. Ali Hamed El Bastawissy</p>
</dean>
<dean>
<p>Dean of the Faculty of Computer Sciences.</p>
</dean>
<dean>
<p>MSA University.</p>
</dean>
</all>
And here's my code:
$(document).ready(function() {
$.ajax({
type: "GET",
url:"read.xml,
dataType:"xml",
success: xmlParser
});
});
function xmlParser(xml){
$('#load').fadeOut();
$(xml).find("dean").each(function(){
$("#certificate").append('<div class="dean "><img src=" images/'+$(this).find("image").text()+' "width="200" height="225" alt=" '+$(this).find("p").text+' "/> <br/> <div class="dean">'+$ (this).find("p").text()+'<br/>$'+$(this).find("p").text()+'</div></div>');
$(".p").fadeIn(1000);
});
}
The #certificate's DIV is the DIV that I want to load from the XML and pass to the output.

paring html tags in xslt

I have the following XML
<p><bold>Dr. Rudy Smaling</bold></p>
<p>Dr. Rudy Smaling currently serves as executive director of systems engineering at Cummins, responsible for implementation of systems engineering principles and processes across the corporation. Dr. Smaling previously held the position of Chief Engineer with global responsibility for hybrid system architecture and new product development in Eaton Corporation's Hybrid Power Systems Division. Dr. Smaling also holds a position as adjunct Professor in Mechanical and Aeronautical Engineering at Western Michigan University.</p>
I am using following XSLT
<xsl:for-each select="p">
<xsl:value-of select="text()"/>
</xsl:for-each>
But it is showing following output
Dr. Rudy Smaling currently serves as executive director of systems engineering at Cummins, responsible for implementation of systems engineering principles and processes across the corporation. Dr. Smaling previously held the position of Chief Engineer with global responsibility for hybrid system architecture and new product development in Eaton Corporation's Hybrid Power Systems Division. Dr. Smaling also holds a position as adjunct Professor in Mechanical and Aeronautical Engineering at Western Michigan University
But I want to parse bold tag also. I want output in the following way
**Dr. Rudy Smaling**
Dr. Rudy Smaling currently serves as executive director of systems engineering at Cummins, responsible for implementation of systems engineering principles and processes across the corporation. Dr. Smaling previously held the position of Chief Engineer with global responsibility for hybrid system architecture and new product development in Eaton Corporation's Hybrid Power Systems Division. Dr. Smaling also holds a position as adjunct Professor in Mechanical and Aeronautical Engineering at Western Michigan University
How to do this?
Instead of using xsl:for-each, you could use xsl:apply-templates
<xsl:apply-templates select="p" />
Now, if you did not actually want to output p tags, you would not need to write a template that matches p, but instead allow XSLT's built-in templates to match it, which will jump over it and carry on processing its children, outputting any text nodes it finds. Unless, of course, you wanted a carriage return after each p.
This means you only need to write a template for your bold attribute
<xsl:template match="bold">
<xsl:text>**</xsl:text>
<xsl:apply-templates />
<xsl:text>**</xsl:text>
</xsl:template>
Try this XSLT
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes" />
<xsl:template match="/*">
<xsl:apply-templates select="p" />
</xsl:template>
<xsl:template match="p">
<xsl:apply-templates />
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="bold">
<xsl:text>**</xsl:text>
<xsl:apply-templates />
<xsl:text>**</xsl:text>
</xsl:template>
</xsl:stylesheet>
When applied to the following well-formed XML (note it has a single root element)
<body>
<p><bold>Dr. Rudy Smaling</bold></p>
<p>Dr. Rudy Smaling currently serves as executive director of systems engineering at Cummins, responsible for implementation of systems engineering principles and processes across the corporation. Dr. Smaling previously held the position of Chief Engineer with global responsibility for hybrid system architecture and new product development in Eaton Corporation's Hybrid Power Systems Division. Dr. Smaling also holds a position as adjunct Professor in Mechanical and Aeronautical Engineering at Western Michigan University.</p>
</body>
The following is output
**Dr. Rudy Smaling**
Dr. Rudy Smaling currently serves as executive director of systems engineering at Cummins, responsible for implementation of systems engineering principles and processes across the corporation. Dr. Smaling previously held the position of Chief Engineer with global responsibility for hybrid system architecture and new product development in Eaton Corporation's Hybrid Power Systems Division. Dr. Smaling also holds a position as adjunct Professor in Mechanical and Aeronautical Engineering at Western Michigan University.