[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

XML

20K

Solutions

13K

Contributors

Extensible Markup Language (XML) refers to the encoding of documents such that they can be read by both machines and humans. XML documents use tags to show the beginning and end of a set of data. XML is used extensively on websites to show volumes of data, and is the default for a number of office productivity suites. This topic includes discussions of XML-related technologies, such as XQuery (the XML Query language), XPath (the XML Path language), XSLT (eXtensible Stylesheet Language Transformations), XLink (the XML Linking language) and XPointer (the XML Pointer language).

Share tech news, updates, or what's on your mind.

Sign up to Post

I am trying to post an  xml file to a website that uses https and TSL1.2 with the following vbscript.  I supsect the TSL1.2 requirement is casuing the failure point .  I do get back
error 80072EE6  "the url does use a recognized protocol"  .  The vbs code is as follows:

Dim xmlhttp

Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")

' Indicate that page that will receive the request and the
' type of request being submitted
xmlhttp.Open "POST", " https://xxxxx.xxxx.xxxxx.xxxxx/data.xml", False


' Indicate that the body of the request contains form data
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

' Send the data as name/value pairs
xmlhttp.send "Id=1&S=2"

Set xmlhttp = Nothing

Open in new window


Any thoughts
0
JavaScript Best Practices
LVL 12
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

My understanding of the XML language is that it is used to store and transport documents across the world wide web, but I have yet to experience some specific examples of it being used.
One that I thought of is, that if I wanted to move some data from a SQL Server database to an Oracle database, then I would transfer it as an XML document.
Is this how it would be done ?  
What other examples can you experts think of ?
0
All the folders in screenshot are created by copying and renaming one Template folder. Now all sub-folders contains one xml file, need to update the path in these xml's with the path of Crystal Reports and DocMan folder, which exist in all these folders.

[xml]$XmlDocument = Get-Content -Path d:\Site\"$($name)\$($name).xml"
$XmlDocument.breakfast_menu.food.DocMan = 'd:\Site\'
$XmlDocument.breakfast_menu.food.Crystalreports = 'd:\Site\'
$XmlDocument.Save("D:\Site\"$($name)\$($name).xml")

The above script is not giving the desired result.

My earlier script for copying and renaming:
$source = 'd:\Site\Template'
$target = 'd:\Site\'
$xmlPath = 'D:\Tenant.xml'

$xml = [xml](Get-Content -Path $xmlPath)
$envCode = $xml.SelectSingleNode('Tenants/ENVcode').InnerText.Trim()
$xml.SelectNodes('Tenants/Schools/School') | ForEach-Object {
      $name = "$($envCode)-$($_.InnerText.Trim())"
      $destination = Join-Path -Path $target -ChildPath $name
      Copy-Item -Path $source -Destination $destination -Recurse -Force -Verbose
      Get-ChildItem -Path $destination -Filter default.xml -Recurse | Rename-Item -NewName "$($name).xml"      
}
Screenshot.png
0
<?xml version="1.0" encoding="UTF-16"?>
<cust-response>
   <result-response>
     <load entity="CUSTOMER" id="1234">
        <result-entry result-id="456" succeed="Yes">
           <return F_RESULT="focused" STATUS="C" />
        </result-entry>
        <result-entry result-id="789" succeed="No">
           <errors>
              <error name="other">
                 <desc>
                      <error-message>Result cannot be validated</error-message>
                 </desc>
              </errors>
        </result-entry>
     </load>
     <load entity="CUSTOMER" id="5678">
        <result-entry result-id="789" succeed="Yes">
           <return F_RESULT="focused" STATUS="C" />
        </result-entry>
        <result-entry result-id="555" succeed="No">
           <errors>
              <error name="other">
                 <desc>
                      <error-message>Result cannot be validated</error-message>
                 </desc>
              </errors>
        </result-entry>
     </load>
   </result-response>
</cust-response>

I want to return a class array of the following:
   CustomerId
      Result-id's and succeed yes or no and if errors showing the error messages
0
According to this Greg Maxey article it's possible to customise the context sensitive menu at the bottom of this screenshot both via customUI XML and the older CommandBars model.

Office context menu for text
But is there any way to customise the smaller popup menu at the top e.g. the one with the font formatting controls in it?
0
I import my XSD file i got parsing error while i have build

 org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'x/request/xxx.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
0
I am having a hair-pulling issue with SAML. I am displaying sanitized versions (with exact search-and-replace) of my current SAML AuthnRequest, the subsequent response, and the ensuing logout request which results in, "No active session(s) found matching LogoutRequest." For context, I am using Auth0 as my identity provider (only for the testing phase). I keep hoping I'm missing something silly.

Login Request sent to https://myapplication.auth0.com/app_id_ixjdiiopspekDDikdkow?SAMLRequest=<base64encoded/urlencoded representation of below>:
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="app_id_ixjdiiopspekDDikdkow" Version="2.0" ProviderName="SAML Test" IssueInstant="{ts '2018-10-17 08:54:00'}" Destination="https://myapplication.autho0.com/samlp/app_id_ixjdiiopspekDDikdkow" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" AssertionConsumerServiceURL="http://login.myapplicatoin.com/sso_login">
    <saml:Issuer>http://login.myapplication.com/sso_login</saml:Issuer>
    <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" AllowCreate="true" />
    <samlp:RequestedAuthnContext Comparison="exact">
        <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
    </samlp:RequestedAuthnContext>
</samlp:AuthnRequest>

Open in new window

The Response:
<samlp:Response 

Open in new window

0
I need to get information from a XML file where this file is auto upload every 30 seconds.
I want to show this information in a website.

Just to show an example, my website is a radio, and I want to show to users what music he listen.
0
I have One XML file in  d:/Site/Template/default.xml and parallel to the default.xml file , I have two folders in Template folder named as - Crystal Reports and DocMan. My default.xml file contains the two nodes CrystalReports and DocMan. I need to automatically edit the nodes with the updated path of the folder at new location.

I am using the below script to copy and rename all the folders. After running the below script I also need to update the new paths in the respective XML's in each new created folder.

$source = 'd:\Site\Template'
$target = 'd:\Site\'
$xmlPath = 'D:\Tenant.xml'

$xml = [xml](Get-Content -Path $xmlPath)
$envCode = $xml.SelectSingleNode('Tenants/ENVcode').InnerText.Trim()
$xml.SelectNodes('Tenants/Schools/School') | ForEach-Object {
      $name = "$($envCode)-$($_.InnerText.Trim())"
      $destination = Join-Path -Path $target -ChildPath $name
      Copy-Item -Path $source -Destination $destination -Recurse -Force -VerboseI need to insert path in XML of the DocMan and CrystalReports folder      Get-ChildItem -Path $destination -Filter default.xml -Recurse | Rename-Item -NewName "$($name).xml"
}

After running this I will get all the folders with names listed in my Tenant file. Also inside all the folders, my default.xml file is renamed to name same as the folder name.xml. I just need to update the paths also inside all these new folder.xml with the corresponding new path in CrsRep and Doc Node.
0
Hi all,
I'm having a problem reading in an RDLC xml file.  My purpose is to collect information about the dataset(s), e.g. Dataset Name and Table name.
I've been dealing with xml projects for decades and for some reason every piece of code I try returns nothing.
Try
            Dim xmlDOC As New XmlDocument()
            xmlDOC.Load(XMLFILE)

            Dim nodeList As XmlNodeList = xmlDOC.SelectNodes("/Report/DataSets/DataSet")
            MsgBox(nodeList.Count)
            For Each node As XmlNode In nodeList
                MsgBox("DataSet Name: " & node("Name").InnerText)
            Next



        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

Open in new window

0
Exploring SQL Server 2016: Fundamentals
LVL 12
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

I have a folder and in that I have multiple sub-folders , each containing a default.xml file. I need to rename all the default.xml within all these sub-folders with the same name as that of the sub-folder.

So that my default.xml will become sub-folder_name.xml.

Lets say My main folder is \sites\ASDF, within that I have 10 sub-folders -> ABC-123, DEF-231, ......like this and I want to rename the default.xml within all these sub-folder to ABC-123.xml, DEF-231.xml. It should be done by using Powershell. Any ideas?

rename-item –path "d:\a2\a11\SIT-E1236\default.xml" –newname d:\a2\a11\SIT-E1236\SIT-E1236.xml
rename-item –path "d:\a2\a11\SIT-E1238\default.xml" –newname d:\a2\a11\SIT-E1236\SIT-E1238.xml

This using some loop?

Also how can I edit some xml files together to make some particular changes on the xml nodes?
0
At vultr.com I ne to lock UDP port 389... I guess they receive lots of static from hackers stealing information from there clients! I have the procedure to do this from Windows firewall but I want to use a 3rd party app. I need a xml script to change rules! I tried looking but everyone hates the block of MS's protocol but vultr loses money due to clients losing important information in the cache of the protocol. They want the port off...

I never wrote xml I have a layout for basic coding
<element>
 <![CDATA[-XML CODE HERE
 <script>a=1;</script>]]>
</element>

I have a convert from html to xml as well.
<element>
<xmltag><![CDATA[HTML CODE HERE]]></xmltag>
</element>

Email sent by vultr.com

Dear Customer,

Recent network security audits have detected some issues on your instances. Please review the following reports and help us to ensure the security of our network:




== Insecure LDAP servers ==
LDAP can be abused by attackers to conduct DDOS attacks against third party machines. We suggest that you not expose LDAP to the internet, and use a firewall to ensure that it cannot be accessed by third parties.

For Linux machines, please add firewall rules to block port 389 via UDP:

iptables -I INPUT 1 -m udp -p udp --dport 389 -j DROP

On Windows machines, we'd suggest adding a similar firewall rule to block port 389:
1) Click Start, type 'wf.msc'
2) Right click 'Inbound Rules', select 'Add Rule'
3) Select 'Port' and click Next
4) Select UDP, …
0
I have one simple Xml file- Tenants

<?xml version="1.0" encoding="UTF-8"?>
<Tenants>
  <ENVcode>
    SIT
  </ENVcode>
  <Schools>
      <School>
            E1234
      </School>
      <School>
            E1236
      </School>
      <School>
            E1238
      </School>
  </Schools>
 </Tenants>

Also I have one folder for which I need to copy that and paste the contents in another folder and the name should be read from the xml file - "Tenants" and format of name should be <ENVCode>-<School>.

I am writing the below command. Can anyone help please.

[xml]$XmlDocument = Get-Content -Path D:\a1\Tenant.xml
 Copy-Item -Path d:\a1 -Destination d:\$XmlDocument.Tenants.ENVcode-$XmlDocument.Tenants.Schools.School

In our case the folder should be pasted to 3 different folders with name SIT-E1234 , SIT-E1236, SIT-E1238.

Also inside these folders we need to rename all their xml files in the same format.xml

Also tried the below-

[xml]$XmlDocument = Get-Content -Path D:\a1\Tenant.xml
Copy-Item -Path "d:\a1\a11\*" -Destination "d:\a2\a11\"$XmlDocument.Tenants.ENVcode-$XmlDocument.Tenants.Schools.School"-"recurse -Force -Verbose
0
I want to kickstart a rhel7.5 kvm VM on a RHEL7.5 host using ansible.  I have a very basic yml file as follows.

test.yml
- hosts: test-host
  tasks:

  - name: define VM
    virt:
      command: define
      name: testvm
      xml: "{{ lookup('template', 'test.xml.j2') }}"

  - name: start VM
    virt:
        name: testvm
        state: running

Can I use the contents of virsh dumpxml from another VM for test.xml?  If not does anyone have a template file that they can pass on?  Do I require my usual ks.cfg file or can this be included in the xml?
0
Hi experts. Please have a look at the attached file which contains a script that creates a XML schema collection.
I am trying to understand the role played by each of the namespaces defined at the start.
There is a target namespace called 'Product ModelManuInstructions', which is also the default namespace because it has 'xmlns ='  without a colon or a prefix.
Following on from this the XMLSchema namespace is also defined with the prefix 'xsd'.

My understanding is that the XMLSchema namespace will contain items that are used generally (or widely) by namespaces, e.g. element, choice, string, complex type, while the target namespace is more specific to the application viz. 'tool', 'material' and 'blueprint'.
Is this a correct interpretation ?  

If so, does the collection always have to contain the XMLSchema namespace and could the target namespace have been omitted leaving the the default namespace on it's own or vice-versa ?
0
Hello. I'm having an issue returning an XPath value. The statement runs and I see the 4 nodes returned but when I try to get the "Text()" value for them. Nothing returns. Can you please let me know why the syntax is failing?  

This works:  
/w:document/w:body[1]/w:tbl[1]/w:tr[1]/w:tc/*[1]

This does not work:
/w:document/w:body[1]/w:tbl[1]/w:tr[1]/w:tc/*[1][attribute::text()]
nor this
/w:document/w:body[1]/w:tbl[1]/w:tr[1]/w:tc/*[1].text()
nor this
/w:document/w:body[1]/w:tbl[1]/w:tr[1]/w:tc/*[1].HtmlText()
TheDocumentXML.txt
0
Hello Experts. Could I get some advice on how to parse a table that is in Microsoft Word XML document using XPath. I created a Word doc, changed the extension to .zip and am using the document.xml file. I need to loop through the table and output the rows and columns. I know the table has a nested table in it but for now let's just ignore that. I'm not sure if XPath has the appropriate coding constructs to do what I need.  1) Identify the table. 2) find out how many rows it contains. 3) Find out how many columns it contians. 4) Iterate through each row and print the values for each cell. I'm using Coldfusion 10 to read in the file but it really could be in any language.

This is the start of the first table: //w:tbl[1]  
The start of the first row:  /w:document/w:body[1]/w:tbl[1]/w:tblGrid[1]
But how do you find the columns and iterate through the table?
TheDocumentXML.txt
0
Hey

$org = "123"
XML @orgunit = "MyDepartment(123)"

$xml.SelectSingleNode("//*[@orgunit='$org']")

How do I match the "123" with the "MyDepartment(123)" - the department number is always between the ().
0
I have a SVG file in XML format i am trying to deserialize XML to C# objects but when trying to deserialize XML data it is giving error

Below is my code

XmlSerializer serializer = new XmlSerializer(typeof(List<rootobject>));
object objectList = null;
using (StreamReader stream = new StreamReader(@"C:\Users\sana-user\Documents\Visual Studio 
      2015\Projects\SVGXMLToJsonApp\SVGXMLToJsonApp\File\3rect.svg"))
{
      objectList = serializer.Deserialize(stream);
}
 Console.WriteLine(objectList);

Open in new window


Below is my class

[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://www.w3.org/2000/svg")]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://www.w3.org/2000/svg", IsNullable = false)]
public partial class svg
{

    private svgStyle styleField;

    private svgG[] gField;

    private string[] textField;

    private decimal versionField;

    private string idField;

    private string xField;

    private string yField;

    private string viewBoxField;

    private string style1Field;

    private string spaceField;

    public svgStyle style
    {
        get
        {
            return this.styleField;
        }
        set
        {
            this.styleField = value;
        }
    }

    [System.Xml.Serialization.XmlElementAttribute("g")]
    public svgG[] g
    {
        get
        {
            return this.gField;
        }
        set
        {
            this.gField = value;
        }
    }

 

Open in new window

0
Rowby Goren Makes an Impact on Screen and Online
LVL 12
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Hi, How to transform the below XML to PDF using XSL:FO

<paragraphs>
   <paragraph>ahsbdgdgdg<a href="https://aaaa.com/xsd &did=jsjsj">Test</a>
   </paragraph>
</paragraphs>

Open in new window

0
This may be difficult to answer without sharing my code. if necessary i will share it.

I wrote a c# script that runs a query from the database and outputs in an xml file. The file format is like this:
  <ImportByExternalID>
    <ID>102</ID>
    <Name>102 - All Stores</Name>
    <BulkData>
           s002,Store 002
           s007,Store 007
           s010,Store 010
    </BulkData>
</ImportByExternalID>

My sql query returns the id, name and bulk data, however the bulkdata is one row at a time. So the output of the xml is a new set of tags for each row.

Below is a sample of what my sql returns. What i am trying to do is for each "ID" list all the rows in the bulkdata tag. I'm not the greatest programmer here. it took me forever to get this far. Just looking for suggestions on best way to approach this. Again i'll share code if needed.

ID       Name                         BulkData
1      1 - Shippensburg         s038,Store 038
1      1 - Shippensburg         s056,Store 056
2      2 - State College         s033,Store 033
2      2 - State College         s051,Store 051
2      2 - State College         s137,Store 137
2      2 - State College         s187,Store 187
3      3 - Wellsboro         s198,Store 198
0
Hi,

How do I open an XML file to edit in windows 10? I tried Notepad and Notepad++ all did not work.

Thank you in advance!

May
0
Hello Experts!

How do you configure a C# soap service to handle https? When I use a url like this: [ http://myservice.mydomain.com/service.svc?wsdl ] it works fine and returns xml as expected. But when I use the same url, but with https instead of http, I get a web page (html) response from the web service. This must be a web.config service endpoint binding issue, I think? Can you tell me how to get the xml output while using the https?

Thank you,

Fox
0
Greeting Experts! I have a coding issue that I could use some help with. I'm using ColdFusion 10 to try and parse a Microsoft Word document, extract the contents, keep it's formatting, and put it into a SQL Server database in multiple parts. For example if the word doc were HTML, each row would go into the database separately. This is turning out to be a tough nut to crack. I'm having trouble with the XPath part. I can find individual cells with the XML structure that ColdFusion creates but I can't seem to list all child nodes for a given element. This is all an attempt to keep the MS Word formatting, including special characters. I know parsing HTML would be easier but the goal is to do it with the original MS Word document. Given the key words from the left hand column, the Word Doc will filter out the Details Text in the right column. For example if the key word search was "Bob" then only the rows that have "Bob" in the first column will be displayed. I'd like to stay away from third party plug-ins. Any help is appreciated.  Thank you.
EE_CFM_XML_DB.txt
TheDocument.docx
0
Wordpress / Yoast.  i have a lot of Draft Pages in my wordpress CMS.  Yoast will not put them in the sitemap if I mark them to be excluded, but there are too many to go through.  They are all in one category.  I want Yoast to not place a specific category (or taxonomy, which ever is easier) in my XML sitemap.  The reason is, Google will index Draft and private pages and I don't want that because they will come up 404.

How do I exclude a category from the XML sitemap in Wordpress

I found this but I dont think it is what I want

/* Noindex all posts in a category */
add_filter("wpseo_robots", function($robots) {
  if (is_single() && in_category(array(100))) {
    return "noindex,follow";
  }
  return $robots;
});

Open in new window

0

XML

20K

Solutions

13K

Contributors

Extensible Markup Language (XML) refers to the encoding of documents such that they can be read by both machines and humans. XML documents use tags to show the beginning and end of a set of data. XML is used extensively on websites to show volumes of data, and is the default for a number of office productivity suites. This topic includes discussions of XML-related technologies, such as XQuery (the XML Query language), XPath (the XML Path language), XSLT (eXtensible Stylesheet Language Transformations), XLink (the XML Linking language) and XPointer (the XML Pointer language).