Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7752011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:41:36+00:00 2026-06-01T11:41:36+00:00

I have a xml schema like this: <?xml version=1.0 encoding=utf-8?> <NEWS> <category title=title> <sbml

  • 0

I have a xml schema like this:

<?xml version="1.0" encoding="utf-8"?>
<NEWS>
       <category title="title">
              <sbml title="title" value="SBML_NEWSBGCOLOR" version="7.26.23" />
              <sbml title="title" value="SBML_NEWSWIDTHTYPE" version="7.26.23" />
       </category>
</NEWS>

I’m using asp Classic and I have a form that passes 4 variables to create new <sbml /> node.

Set objXML = Server.CreateObject("MSXML2.DOMDocument.3.0")
objXML.async = False
objXML.setProperty "ServerHTTPRequest", True
strXMLFile = Server.MapPath("\") & "\admin\sbml\72623.xml"
if objXML.Load(strXMLFile) Then
       If Request.ServerVariables("REQUEST_METHOD")="POST" Then
              Set new_sbml = objXML.createElement("sbml")
              objXML.selectSingleNode(noInj(rq("M")) & "/category").appendChild(new_sbml)
              objXML.save strXMLFile
       End if
End if

By this method I just added new node but with no attributes, how can i set attributes for this node?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:41:37+00:00Added an answer on June 1, 2026 at 11:41 am

    I just found my answer

    Set objXML = Server.CreateObject("MSXML2.DOMDocument.3.0")
    objXML.async = False
    objXML.setProperty "ServerHTTPRequest", True
    strXMLFile = Server.MapPath("\") & "\admin\sbml\72623.xml"
    if objXML.Load(strXMLFile) Then
           If Request.ServerVariables("REQUEST_METHOD")="POST" Then
                  Set new_sbml = objXML.createElement("sbml")
                  new_sbml.setAttribute "title", new_title 'Here i set attribute
                  objXML.selectSingleNode("/category").appendChild(new_sbml)
                  objXML.save strXMLFile
           End if
    End if
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a schema like this: <?xml version=1.0 encoding=utf-8?> <xs:schema targetNamespace=http://mysticwarlords.kaa/XMLSchema xmlns=http://mysticwarlords.kaa/XMLSchema xmlns:xs=http://www.w3.org/2001/XMLSchema>
I have an XML document that looks like this: <?xml version=1.0 encoding=utf-8?> <Schema Namespace=EDIManagement.Models.Store
I have xml like this: <?xml version=1.0 encoding=utf-8?> <session xmlns=http://winscp.net/schema/session/1.0 name=blah@blah.com start=2011-10-03T15:09:30.481Z> <ls> <destination
I have an options_menu.xml file like this: <?xml version=1.0 encoding=utf-8?> <menu xmlns:android=http://schemas.android.com/apk/res/android> <item android:id=@+id/search
I have something like this (sorry for the bad names) <?xml version=1.0 encoding=utf-8 ?>
I have an XML document that looks like this: <?xml version=1.0 encoding=UTF-8?> <xs:msgdata xmlns:xs=http://www.myCompany.com
I have xml file like this <?xml version=1.0 encoding=UTF-8?> <specification xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:noNamespaceSchemaLocation=file://Desktop/normal.xsd> <university> <refstr>bdvl_te_skrm_stc</refstr>
In my XSD, I have something similar to this: <?xml version=1.0 encoding=utf-8 ?> <schema
i have this xml schema <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns=http://hidden/abc xmlns:xs=http://www.w3.org/2001/XMLSchema targetNamespace=http://hidden/abc elementFormDefault=qualified attributeFormDefault=unqualified
I have defined a xml schema as below <?xml version=1.0 encoding=utf-8?> <xs:schema id=PacketTemplate targetNamespace=http://tempuri.org/PacketTemplate.xsd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.