Questions tagged [xdoc]

An 'xdoc' is an XML document conforming to a small and simple set of tags. Xdoc was the primary documentation format in Apache Maven v1. Maven v2 largely replaced this by Apt, but xdoc is still supported.

38 questions
0
votes
0 answers

Why do batches of larger files get processed faster than same-sized batches of smaller files?

Does it make sense that a VB6 program that processes ~50,000 xml files runs about 3x faster [in terms of number of files processed per second] if the files are each about 30KB in size, than if the files are each about 4KB in size? If it does make…
BRW
  • 187
  • 1
  • 10
0
votes
0 answers

Iterating through for loop but getting only one result

I am trying to iterate every element under PcsInItem and get Price for each and insert them into SQL table. Below is my XML structure.
thatthing
  • 676
  • 3
  • 15
  • 39
0
votes
1 answer

XDocument Filter by attribute date value

I have the following XML structure, I need to filter it using LINQ by attribute "date" where the value of the "date" attribute is less than today. The attribute date is on the format "yyyymmddhhmmss +Zone". For example in the given XML first node…
Max
  • 470
  • 2
  • 9
  • 22
0
votes
2 answers

Querying XMLelements in C#

I have many complex XML files that I would like to query and search to get one value, below are two shortened example: 1 15
user9619119
0
votes
1 answer

Check if an xml section exist in a file using XDocument

I have some code that reads in an xml file. However it is triggering an error at the 3rd IF statement: if (xdoc.Root.Descendants("HOST").Descendants("Default") .FirstOrDefault().Descendants("HostID") …
John
  • 787
  • 4
  • 11
  • 28
0
votes
0 answers

HTMLworker is printing style tag contents on the top of the generated pdf

I am trying to read a docx file into html using XdocReport and convert that html into pdf using htmlworker. It all works fine and I can see that the styling part is also OK in the final pdf. The only issue is that the contents of the style tag are…
Naxi
  • 1,504
  • 5
  • 33
  • 72
0
votes
2 answers

Using xdoc to find multiple sub descendant elements within a specific top elements

I have this type of xml file and I am trying to get the Id and Host for each group. BTeam 1234 BTeamHost CTeam
John
  • 787
  • 4
  • 11
  • 28
0
votes
1 answer

Why am I getting first node again on second iteration in this XDocument

I read about XML XDocument and running a few test but now I get the same first node on second lap in the foreach Here´s my C# code for the CRUD get: public IActionResult GetBookItems() { List BookItems = new…
Tord Larsen
  • 2,670
  • 8
  • 33
  • 76
0
votes
0 answers

Can I load an XML file by partial name using FolderBrowserDialog then loop to open another?

I have working code to load 7 different XML files and import the relevant data into data tables displaying using data grid views. This uses an individual open file dialog per file, I would now like to create an automated button which will load the…
Steve Carr
  • 13
  • 3
0
votes
1 answer

Remove all text not wrapped in XML braces

I want to remove all invalid text from an XML document. I consider any text not wrapped in <> XML brackets to be invalid, and want to strip these prior to translation. From this post Regular expression to remove text outside the tags in a string -…
EightSquared
  • 37
  • 2
  • 13
0
votes
1 answer

Loop each Items in c# using XElement

I am facing some difficulty in swapping the id attribute in the list of Items in a C# XDocument. The id is a reference. Input: Test1 bookref1
0
votes
1 answer

How to save xml file after reverse some childs on it

I have an xml file and I want to reverse some nodes and after that I want to save the result. I used XDocumnt and use revese function on it and it reversed correctly but after that I don not know how to save the file. the original file like the…
Muhammad Hassan
  • 475
  • 2
  • 14
0
votes
0 answers

update node value of two similar type of XML files in C#

I am receiving two unknown format xml files from external source in my application. Normally both xml files are having identical structure but some time some nodes are different. I have to read one xml file node by node and update value in another…
user2478625
  • 123
  • 2
  • 12
0
votes
1 answer

How can i Load a Xdocument online who needs a username and a password

Is it possible to Load an XML File who has a password and a username like so: XDocument xmlDoc = XDocument.load("htt://myApp/MyTestFile", "Username", "passwordtest"); Please help, I am hanging on that last point for my app.
Wodds
  • 5
  • 1
0
votes
2 answers

C# Adding multiple elements to a list using xdocument

C:\watchFolder us-west-2 configurationtestbucket
John
  • 11
  • 5