Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: XML Editing formatting lost
Post: RE: XML Editing formatting lost

I shall be extremely grateful if someone can help as I'm really stressed up with this
ateestructural General Coding Help 2 1,861 Apr-07-2021, 07:33 PM
    Thread: XML Editing formatting lost
Post: XML Editing formatting lost

I'm trying to edit an xml but in the process I'm losing the formatting and thus the edited xml is not readable in the software I want to because of the messed formatting. I do not want to lose any for...
ateestructural General Coding Help 2 1,861 Apr-07-2021, 06:58 PM
    Thread: Parsing xml
Post: RE: Parsing xml

I got it working. I had to iterate through subelements and then edit the attribute as below for subelem in list(element): subelem.set('destination', target_string_list[0]) s...
ateestructural General Coding Help 2 1,852 Apr-06-2021, 07:09 PM
    Thread: Parsing xml
Post: RE: Parsing xml

I shall be gratly indebted if someone can point me in a direction on how to edit the "destination" Whether I ask for attributes/text of the tag outputParameters it is returned as none
ateestructural General Coding Help 2 1,852 Apr-06-2021, 01:54 PM
    Thread: Parsing xml
Post: Parsing xml

I have the following Python code: def xml_parsing(file_name, tag_name, source_string_list, target_string_list): from xml.etree import ElementTree with open(file_name, 'rb+') as f: ...
ateestructural General Coding Help 2 1,852 Apr-06-2021, 01:08 PM
    Thread: Replacing text in xml
Post: RE: Replacing text in xml

Thank you very much, that sorted it. Much appreciated and obliged
ateestructural General Coding Help 4 6,361 Apr-06-2021, 09:21 AM
    Thread: Replacing text in xml
Post: RE: Replacing text in xml

I shall be extremely grateful if someone can help?
ateestructural General Coding Help 4 6,361 Apr-06-2021, 12:17 AM
    Thread: Replacing text in xml
Post: Replacing text in xml

I have this code but the text is not replaced in the file titled: file_name (although as a python string the replacement is correct but I expected to change in file_name) Can anyone figure why is tha...
ateestructural General Coding Help 4 6,361 Apr-05-2021, 11:53 PM
  Music Thread: XML File - cannot find the tag
Post: XML File - cannot find the tag

I have the attached xml file. I want to find the tag: inputDataLocation in the attached xml and want to edit the VALUE related text I tried several debugs but cannot find in. This is my xml file. In...
ateestructural General Coding Help 1 2,099 Apr-05-2021, 09:24 PM
    Thread: Writing unit test results into a text file
Post: RE: Writing unit test results into a text file

Any help will be gratefully appreciated. I ven tried the below code but the output is not written to the file/no file is created Quote:import unittest import validate_setup import sys class TestVa...
ateestructural General Coding Help 3 4,654 Nov-15-2020, 05:41 PM
    Thread: Writing unit test results into a text file
Post: RE: Writing unit test results into a text file

No really sure what is wrong as ssame solution is given in few other forums. I'm using Eclipse IDE
ateestructural General Coding Help 3 4,654 Nov-15-2020, 05:19 PM
    Thread: Writing unit test results into a text file
Post: Writing unit test results into a text file

I want to write the results of my unit tests into a text file but it does not seem to be working. Here is my code: I shall be grateful if someone can please help? unit tests: Quote:import unittest i...
ateestructural General Coding Help 3 4,654 Nov-15-2020, 04:41 PM
    Thread: .Set - Unable to understand the statement
Post: .Set - Unable to understand the statement

I have the following code which I have inherited it from someone else. vocab_filename = 'vocab.txt' vocab = load_doc(vocab_filename) vocab = vocab.split() vocab = set(vocab)I know in the steps above: ...
ateestructural General Coding Help 5 2,309 Aug-02-2020, 01:00 PM
    Thread: Unable to understand a statement in an existing code
Post: Unable to understand a statement in an existing co...

I have the following code: import nltk nltk.download('stopwords') import nltk.corpus import re import string # turn a doc into clean tokens from load_file_with_function import load_doc def clean...
ateestructural General Coding Help 1 2,191 Aug-01-2020, 08:54 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020